Pārlūkot izejas kodu

Updated addhomintimacy script command (#8551)

* The command now fails silently when no players are attached or if the player has no homunculus (like other homunculus script command)

Fixed #8534
Atemo 9 mēneši atpakaļ
vecāks
revīzija
a5c939bec9
2 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 1 0
      doc/script_commands.txt
  2. 1 1
      src/map/script.cpp

+ 1 - 0
doc/script_commands.txt

@@ -10691,6 +10691,7 @@ current invoking character.
 *addhomintimacy <amount>{,<char_id>};
 
 Increase or decrease a homunculus' intimacy value by the given <amount>. 100000 is full loyalty.
+Fails silently when no players are attached or if the player has no homunculus.
 
 ---------------------------------------
 

+ 1 - 1
src/map/script.cpp

@@ -15861,7 +15861,7 @@ BUILDIN_FUNC(addhomintimacy)
 	homun_data *hd;
 
 	if (!script_charid2sd(3, sd) || !(hd = sd->hd))
-		return SCRIPT_CMD_FAILURE;
+		return SCRIPT_CMD_SUCCESS;
 
 	int32 value = script_getnum(st, 2);