Browse Source

[Bug] Patched bug in "AddContact" procedure from telefon.

KeyMasterOfGozer 5 years ago
parent
commit
18cc2bd3e2
2 changed files with 9 additions and 2 deletions
  1. 8 1
      locations/saveupdater.qsrc
  2. 1 1
      locations/telefon.qsrc

+ 8 - 1
locations/saveupdater.qsrc

@@ -568,7 +568,13 @@ if npcSex[14] > 0: npcSex[14] = 0 and npc_sex['A14'] = 1
 
 if npc_dob['A34'] ! 20001219: npc_dob['A34'] = 20001219
 
-if telefon_rev = 0:
+if telefon_rev < 2:
+	killvar '$contact'
+	killvar '$contactIcon'
+	killvar '$contactOCode'
+	killvar '$contactOSche'
+	killvar '$contactICode'
+	killvar '$contactISche'
 	gs 'telefon', 'AddContact', 'A29', 'icon_npc1',"gs 'telefon', 'Phone_call'","hour >= 8 and hour <= 20"
 	if telkat > 0:
 		gs 'telefon', 'AddContact', 'A219', 'icon_kat',"$telsob = 'Kate' & gt 'telefon', 'mobilaraz'","hour >= 8 and hour <= 20"
@@ -576,6 +582,7 @@ if telefon_rev = 0:
 	if npc_QW['A192'] > 0:
 		gs 'telefon', 'AddContact', 'A192', 'icon_nastja',"gs 'telefon', 'start'","hour >= 8 and hour <= 20"
 	end
+	telefon_rev = 2
 end
 
 --- saveupdater ---------------------------------

+ 1 - 1
locations/telefon.qsrc

@@ -1010,7 +1010,7 @@ if $ARGS[0] = 'AddContact':
 	$telefonCon['InSched'] = $ARGS[6]
 	telefonCon['ContactListID'] = arrpos('$contact',$telefonCon['NPC'])
 	if telefonCon['ContactListID'] = -1:
-		telefonCon['ContactListID'] = len($contact)
+		telefonCon['ContactListID'] = arrsize('$contact')
 		$contact[telefonCon['ContactListID']] = $telefonCon['NPC']
 	end
 	$contactIcon[telefonCon['ContactListID']] = $telefonCon['Icon']