Skip to content

Commit

Permalink
[10536] Extend SCRIPT_COMMAND_TEMP_SUMMON_CREATURE to set summoned as…
Browse files Browse the repository at this point in the history
… active object

Field data_flags 0x01 will enable active state

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Sep 25, 2010
1 parent 490e86f commit 468bf08
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/script_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/game/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions src/game/ObjectMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10535"
#define REVISION_NR "10536"
#endif // __REVISION_NR_H__

4 comments on commit 468bf08

@waza123
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, today i had dream that mangos updated to 6.0.0 version of wow and added all user patches to mangos.. but it was only a dream ((((

@roby10
Copy link

@roby10 roby10 commented on 468bf08 Sep 26, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol?

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"added all user patches to mangos." and stop loading... cleary not all user patches make sense adding... and this source of long adding time: need review and research related problem before sure that suggested patch correct.

@roby10
Copy link

@roby10 roby10 commented on 468bf08 Sep 26, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed ,as the wise man said

Please sign in to comment.