From 25da833d9b20178fa96ff9b2fcbed94e27ce1cb9 Mon Sep 17 00:00:00 2001 From: momacabu Date: Sat, 20 Apr 2013 01:00:37 +0000 Subject: [PATCH] - Partial fix for bugreport:1222, if you have a pet and the pet egg is flagged as non-droppable and your inventory is full and you try to return the pet to the egg, the egg would drop; now you won't be able to return the pet to the egg. - Fix for @item, if you use an egg id it would create it regardless of your inventory limit, dropping the item if your inventory is full; now it won't create the egg. - Fixed Bahasa Indonesia translation file, thanks Cydh. - Now the languages at @langtype are displayed as they are written in their original language. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17272 54d463be-8e91-2dee-dedb-b68131a5f0ec --- conf/msg_conf/map_msg_idn.conf | 6 +++--- src/common/mmo.h | 2 +- src/common/msg_conf.c | 16 ++++++++-------- src/map/pet.c | 11 +++++++++++ 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/conf/msg_conf/map_msg_idn.conf b/conf/msg_conf/map_msg_idn.conf index 74c35d4baa..10a49b23ef 100644 --- a/conf/msg_conf/map_msg_idn.conf +++ b/conf/msg_conf/map_msg_idn.conf @@ -186,8 +186,8 @@ 169: Item (%d: '%s') tidak bisa dipakai. 170: Item ini tidak bisa dipakai. 171: %d - sudah habis -172: Kamu sudah mengganti posisi memo %d - %s (%d,%d). -173: Level skill 'Warp' belum cukup. +//172: Kamu sudah mengganti posisi memo %d - %s (%d,%d). +//173: Level skill 'Warp' belum cukup. 174: Jumlah Status Point sudah diubah. 175: Jumlah Skill Point sudah diubah. 176: Jumlah zeny sudah diubah. @@ -267,7 +267,7 @@ 250: Kamu sudah membuka penyimpanan. 251: Kamu sudah membuka penyimpanan guild. 252: Kamu belum bergabung di dalam guild. -253: Kamu tidak diperbolehkan untuk menggunakan memo di map ini. +//253: Kamu tidak diperbolehkan untuk menggunakan memo di map ini. 254: Konfigurasi perintah GM sudah dimuat ulang. 255: Konfigurasi pertempuran sudah dimuat ulang. 256: Database status sudah dimuat ulang. diff --git a/src/common/mmo.h b/src/common/mmo.h index 408a6894ec..eaeb27c359 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -47,7 +47,7 @@ // 20120307 - 2012-03-07aRagexeRE+ - 0x970 #ifndef PACKETVER - #define PACKETVER 20120410 + #define PACKETVER 20100730 //#define PACKETVER 20111116 #endif diff --git a/src/common/msg_conf.c b/src/common/msg_conf.c index 2eaf2b7d16..582647b819 100644 --- a/src/common/msg_conf.c +++ b/src/common/msg_conf.c @@ -98,14 +98,14 @@ int msg_langstr2langtype(char * langtype){ const char* msg_langtype2langstr(int langtype){ switch(langtype){ case 0: return "English (ENG)"; - case 1: return "Russian (RUS)"; - case 2: return "Spanish (SPN)"; - case 3: return "German (GRM)"; - case 4: return "Chinese (CHN)"; - case 5: return "Malasian (MAL)"; - case 6: return "Indonesian (IDN)"; - case 7: return "French (FRN)"; - case 8: return "Brazilian Portuguese (POR)"; + case 1: return "Russkiy (RUS)"; //transliteration + case 2: return "Español (SPN)"; + case 3: return "Deutsch (GRM)"; + case 4: return "Hànyu (CHN)"; //transliteration + case 5: return "Bahasa Malaysia (MAL)"; + case 6: return "Bahasa Indonesia (IDN)"; + case 7: return "Français (FRN)"; + case 8: return "Português Brasileiro (POR)"; default: return "??"; } } diff --git a/src/map/pet.c b/src/map/pet.c index b241c889d7..eae1696fa8 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -75,6 +75,7 @@ int pet_create_egg(struct map_session_data *sd, int item_id) { int pet_id = search_petDB_index(item_id, PET_EGG); if (pet_id < 0) return 0; //No pet egg here. + if (!pc_inventoryblank(sd)) return 0; // Inventory full sd->catch_target_class = pet_db[pet_id].class_; intif_create_pet(sd->status.account_id, sd->status.char_id, (short)pet_db[pet_id].class_, @@ -581,13 +582,23 @@ static int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap); int pet_menu(struct map_session_data *sd,int menunum) { + struct item_data *egg_id; nullpo_ret(sd); + if (sd->pd == NULL) return 1; //You lost the pet already. if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incuvate) return 1; + + egg_id = itemdb_exists(sd->pd->petDB->EggID); + if (egg_id) { + if ((egg_id->flag.trade_restriction&0x01) && !pc_inventoryblank(sd)) { + printf ("THERE WILL NEVER BE ANOTHER TONIGHT = %d.\n", ARRAYLENGTH(sd->status.inventory)); + return 1; + } + } switch(menunum) { case 0: