diff --git a/doc/script_commands.txt b/doc/script_commands.txt index c5577cc7ee..0158ace462 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -297,7 +297,7 @@ prices for items in different shops. Since trunk r12264 you can alternatively use "cashshop" in place of "shop" to use the Cash Shop interface, allowing you to buy items with special points -(Currently stored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS.) +(Currently stored as account variables in global_reg #CASHPOINTS and #KAFRAPOINTS.) This type of shop will not allow you to sell items at it, you may only purchase items here. The layout used to define sale items still count, and "" refers to how many points will be spent purchasing the them. @@ -5391,7 +5391,7 @@ Example: *bonus_script_clear {,{}}; -Removes atatched bonus_script from player. If no 'char_id' given, it will removes +Removes attached bonus_script from player. If no 'char_id' given, it will removes from the invoker. If 'flag' is 1, means will clears all scripts even it's Permanent effect. By default, @@ -5424,7 +5424,7 @@ previously, they will now at 0+the level given. Flag 3 is the same as flag 1 in that it saves to the database. However, these skills are ignored when any action is taken that adjusts the skill tree (reset/job change). -Flag contants: +Flag constants: 0 - SKILL_PERM 1 - SKILL_TEMP 2 - SKILL_TEMPLEVEL diff --git a/src/map/clif.c b/src/map/clif.c index af14aa5cab..9820c10347 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18441,7 +18441,8 @@ void packetdb_readdb(bool reload) char key1[12] = { 0 }, key2[12] = { 0 }, key3[12] = { 0 }; trim(w2); if (sscanf(w2, "%11[^,],%11[^,],%11[^ \r\n/]", key1, key2, key3) == 3) { - CREATE(packet_keys[packet_ver], struct s_packet_keys, 1); + if (!packet_keys[packet_ver]) + CREATE(packet_keys[packet_ver], struct s_packet_keys, 1); packet_keys[packet_ver]->keys[0] = strtol(key1, NULL, 0); packet_keys[packet_ver]->keys[1] = strtol(key2, NULL, 0); packet_keys[packet_ver]->keys[2] = strtol(key3, NULL, 0); @@ -18572,8 +18573,10 @@ void packetdb_readdb(bool reload) ShowStatus("Packet Obfuscation: "CL_GREEN"Enabled"CL_RESET". Keys: "CL_WHITE"0x%08X, 0x%08X, 0x%08X"CL_RESET"\n", clif_cryptKey[0], clif_cryptKey[1], clif_cryptKey[2]); for (i = 0; i < ARRAYLENGTH(packet_keys); i++) { - if (packet_keys[i]) + if (packet_keys[i]) { aFree(packet_keys[i]); + packet_keys[i] = NULL; + } } #endif }