mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
88fca158f8
commit
541098168d
4 changed files with 6 additions and 2 deletions
|
|
@ -137,6 +137,7 @@ spell_scripts
|
||||||
10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE source = any (summoner)
|
10 SCRIPT_COMMAND_TEMP_SUMMON_CREATURE source = any (summoner)
|
||||||
* datalong = creature entry
|
* datalong = creature entry
|
||||||
* datalong2 = despawn_delay
|
* datalong2 = despawn_delay
|
||||||
|
* data_flags = summon_as_active_object = 0x01
|
||||||
|
|
||||||
11 SCRIPT_COMMAND_OPEN_DOOR source = unit
|
11 SCRIPT_COMMAND_OPEN_DOOR source = unit
|
||||||
* datalong = db_guid
|
* datalong = db_guid
|
||||||
|
|
|
||||||
|
|
@ -2619,7 +2619,7 @@ void Map::ScriptsProcess()
|
||||||
float z = step.script->z;
|
float z = step.script->z;
|
||||||
float o = step.script->o;
|
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)
|
if (!pCreature)
|
||||||
{
|
{
|
||||||
sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON (script id %u) failed for creature (entry: %u).", step.script->id, step.script->summonCreature.creatureEntry);
|
sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON (script id %u) failed for creature (entry: %u).", step.script->id, step.script->summonCreature.creatureEntry);
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,9 @@ struct ScriptInfo
|
||||||
{
|
{
|
||||||
uint32 creatureEntry; // datalong
|
uint32 creatureEntry; // datalong
|
||||||
uint32 despawnDelay; // datalong2
|
uint32 despawnDelay; // datalong2
|
||||||
|
uint32 unused1; // datalong3
|
||||||
|
uint32 unused2; // datalong4
|
||||||
|
uint32 flags; // data_flags
|
||||||
} summonCreature;
|
} summonCreature;
|
||||||
|
|
||||||
struct // SCRIPT_COMMAND_OPEN_DOOR (11)
|
struct // SCRIPT_COMMAND_OPEN_DOOR (11)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10535"
|
#define REVISION_NR "10536"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue