mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11840] Fix script command modify_npc_flag
Thanks to faq for pointing. I checked both udb and ytdb, and they don't use this command yet; If however you use it already check your scripts. (The toggle/add/remove flag must be set in `data_flags`) Sorry for the inconvenience. Alos added a forgotten break. Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
7246e51a13
commit
6b355bd987
4 changed files with 9 additions and 7 deletions
|
|
@ -230,8 +230,9 @@ spell_scripts
|
||||||
* datalong2 = creature entry (searching for a buddy, closest to source)
|
* datalong2 = creature entry (searching for a buddy, closest to source)
|
||||||
* datalong3 = creature search radius
|
* datalong3 = creature search radius
|
||||||
* data_flags = flag_target_as_source = 0x01
|
* data_flags = flag_target_as_source = 0x01
|
||||||
|
|
||||||
29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS source=worldobject or target=worldobject (datalong1==0), else source or target = creature
|
29 SCRIPT_COMMAND_MODIFY_NPC_FLAGS source=worldobject or target=worldobject (datalong1==0), else source or target = creature
|
||||||
* datalong=NPCFlags
|
* datalong=NPCFlags
|
||||||
* datalong1=creature entry
|
* datalong2=creature entry
|
||||||
* datalong2=search radius
|
* datalong3=search radius
|
||||||
* data_flags = 0x00=toggle, 0x01=add, 0x02=remove
|
* data_flags = 0x00=toggle, 0x01=add, 0x02=remove
|
||||||
|
|
|
||||||
|
|
@ -3020,6 +3020,8 @@ void Map::ScriptsProcess()
|
||||||
else
|
else
|
||||||
pBuddy->SetFlag(UNIT_NPC_FLAGS, step.script->npcFlag.flag);
|
pBuddy->SetFlag(UNIT_NPC_FLAGS, step.script->npcFlag.flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
sLog.outError("Unknown SCRIPT_COMMAND_ %u called for script id %u.", step.script->command, step.script->id);
|
sLog.outError("Unknown SCRIPT_COMMAND_ %u called for script id %u.", step.script->command, step.script->id);
|
||||||
|
|
|
||||||
|
|
@ -314,10 +314,9 @@ struct ScriptInfo
|
||||||
struct // SCRIPT_COMMAND_MODIFY_NPC_FLAGS (29)
|
struct // SCRIPT_COMMAND_MODIFY_NPC_FLAGS (29)
|
||||||
{
|
{
|
||||||
uint32 flag; // datalong
|
uint32 flag; // datalong
|
||||||
uint32 creatureEntry; // datalong1
|
uint32 creatureEntry; // datalong2
|
||||||
uint32 searchRadius; // datalong2
|
uint32 searchRadius; // datalong3
|
||||||
uint32 empty1; // datalong3
|
uint32 empty1; // datalong4
|
||||||
uint32 empty2; // datalong4
|
|
||||||
uint32 data_flags; // data_flags
|
uint32 data_flags; // data_flags
|
||||||
} npcFlag;
|
} npcFlag;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11839"
|
#define REVISION_NR "11840"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue