[10536] Extend SCRIPT_COMMAND_TEMP_SUMMON_CREATURE to set summoned as active object

Field data_flags 0x01 will enable active state

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-09-25 13:34:48 +02:00
parent 88fca158f8
commit 541098168d
4 changed files with 6 additions and 2 deletions

View file

@ -137,6 +137,7 @@ spell_scripts
10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE source = any (summoner)
* datalong = creature entry
* datalong2 = despawn_delay
* data_flags = summon_as_active_object = 0x01
11 SCRIPT_COMMAND_OPEN_DOOR source = unit
* datalong = db_guid

View file

@ -2619,7 +2619,7 @@ void Map::ScriptsProcess()
float z = step.script->z;
float o = step.script->o;
Creature* pCreature = summoner->SummonCreature(step.script->summonCreature.creatureEntry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->summonCreature.despawnDelay);
Creature* pCreature = summoner->SummonCreature(step.script->summonCreature.creatureEntry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->summonCreature.despawnDelay, (step.script->summonCreature.flags & 0x01) ? true: false);
if (!pCreature)
{
sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON (script id %u) failed for creature (entry: %u).", step.script->id, step.script->summonCreature.creatureEntry);

View file

@ -193,6 +193,9 @@ struct ScriptInfo
{
uint32 creatureEntry; // datalong
uint32 despawnDelay; // datalong2
uint32 unused1; // datalong3
uint32 unused2; // datalong4
uint32 flags; // data_flags
} summonCreature;
struct // SCRIPT_COMMAND_OPEN_DOOR (11)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10535"
#define REVISION_NR "10536"
#endif // __REVISION_NR_H__