mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Merge pull request #176 from KayenEQ/Development
ST_PetMaster target type support added
This commit is contained in:
commit
f0c46664d2
@ -131,10 +131,10 @@ typedef enum {
|
||||
/* 41 */ ST_Group = 0x29,
|
||||
/* 42 */ ST_Directional = 0x2a, //ae around this target between two angles
|
||||
/* 43 */ ST_GroupClientAndPet = 0x2b,
|
||||
/* 44 */ ST_Beam = 0x2c, //like directional but facing in front of you always
|
||||
/* 44 */ //ST_Beam = 0x2c, //like directional but facing in front of you always
|
||||
/* 45 */ //ST_Ring = 0x2d, // Like a mix of PB ae + rain spell(has ae duration)
|
||||
/* 46 */ ST_TargetsTarget = 0x2e, // uses the target of your target
|
||||
/* 47 */ //ST_PetMaster = 0x2e, // uses the master as target
|
||||
/* 47 */ ST_PetMaster = 0x2f, // uses the master as target
|
||||
} SpellTargetType;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@ -1780,6 +1780,24 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
break;
|
||||
}
|
||||
|
||||
case ST_PetMaster:
|
||||
{
|
||||
|
||||
Mob *owner = nullptr;
|
||||
|
||||
if (IsPet())
|
||||
owner = GetOwner();
|
||||
else if ((IsNPC() && CastToNPC()->GetSwarmOwner()))
|
||||
owner = entity_list.GetMobID(CastToNPC()->GetSwarmOwner());
|
||||
|
||||
if (!owner)
|
||||
return false;
|
||||
|
||||
spell_target = owner;
|
||||
CastAction = SingleTarget;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
mlog(SPELLS__CASTING_ERR, "I dont know Target Type: %d Spell: (%d) %s", spells[spell_id].targettype, spell_id, spells[spell_id].name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user