Browse Source

* Follow up 9d247d88c1f8a5d04a386ac6891726724ee226f9
* Typo

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>

Cydh Ramdh 10 years ago
parent
commit
ee24f5c321
2 changed files with 8 additions and 5 deletions
  1. 3 3
      doc/script_commands.txt
  2. 5 2
      src/map/clif.c

+ 3 - 3
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"
 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
 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
 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
 purchase items here. The layout used to define sale items still count, and
 "<price>" refers to how many points will be spent purchasing the them.
 "<price>" refers to how many points will be spent purchasing the them.
@@ -5391,7 +5391,7 @@ Example:
 
 
 *bonus_script_clear {<flag>,{<char_id>}};
 *bonus_script_clear {<flag>,{<char_id>}};
 
 
-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.
 from the invoker.
 
 
 If 'flag' is 1, means will clears all scripts even it's Permanent effect. By default,
 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
 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).
 are ignored when any action is taken that adjusts the skill tree (reset/job change).
 
 
-Flag contants:
+Flag constants:
 	0 - SKILL_PERM
 	0 - SKILL_PERM
 	1 - SKILL_TEMP
 	1 - SKILL_TEMP
 	2 - SKILL_TEMPLEVEL
 	2 - SKILL_TEMPLEVEL

+ 5 - 2
src/map/clif.c

@@ -18441,7 +18441,8 @@ void packetdb_readdb(bool reload)
 					char key1[12] = { 0 }, key2[12] = { 0 }, key3[12] = { 0 };
 					char key1[12] = { 0 }, key2[12] = { 0 }, key3[12] = { 0 };
 					trim(w2);
 					trim(w2);
 					if (sscanf(w2, "%11[^,],%11[^,],%11[^ \r\n/]", key1, key2, key3) == 3) {
 					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[0] = strtol(key1, NULL, 0);
 						packet_keys[packet_ver]->keys[1] = strtol(key2, NULL, 0);
 						packet_keys[packet_ver]->keys[1] = strtol(key2, NULL, 0);
 						packet_keys[packet_ver]->keys[2] = strtol(key3, 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]);
 	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++) {
 	for (i = 0; i < ARRAYLENGTH(packet_keys); i++) {
-		if (packet_keys[i])
+		if (packet_keys[i]) {
 			aFree(packet_keys[i]);
 			aFree(packet_keys[i]);
+			packet_keys[i] = NULL;
+		}
 	}
 	}
 #endif
 #endif
 }
 }