mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)
This commit is contained in:
@@ -148,11 +148,11 @@ public:
|
||||
if( damage >= me->GetHealth() )
|
||||
{
|
||||
damage = me->GetHealth() - 1;
|
||||
if( me->getFaction() != 35 )
|
||||
if (me->GetFaction() != FACTION_FRIENDLY)
|
||||
{
|
||||
me->CastSpell((Unit*)nullptr, 68575, true); // achievements
|
||||
me->GetMap()->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, 68574, me); // paletress' spell credits encounter, but shouldn't credit achievements
|
||||
me->setFaction(35);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
events.Reset();
|
||||
Talk(TEXT_EADRIC_DEATH);
|
||||
me->getThreatMgr().clearReferences();
|
||||
@@ -296,10 +296,10 @@ public:
|
||||
{
|
||||
damage = me->GetHealth() - 1;
|
||||
|
||||
if( me->getFaction() != 35 )
|
||||
if (me->GetFaction() != FACTION_FRIENDLY)
|
||||
{
|
||||
me->CastSpell((Unit*)nullptr, 68574, true); // achievements
|
||||
me->setFaction(35);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
events.Reset();
|
||||
Talk(TEXT_PALETRESS_DEATH);
|
||||
me->getThreatMgr().clearReferences();
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
float dist = rand_norm() * 40.0f;
|
||||
if( Creature* c = me->SummonCreature(NPC_SCARAB, AnubLocs[0].GetPositionX() + cos(angle) * dist, AnubLocs[0].GetPositionY() + sin(angle) * dist, AnubLocs[0].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000) )
|
||||
{
|
||||
c->setFaction(31);
|
||||
c->SetFaction(FACTION_PREY);
|
||||
c->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->GetMotionMaster()->MoveRandom(15.0f);
|
||||
}
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
me->CastSpell(me, SPELL_ACID_MANDIBLE, true);
|
||||
determinationTimer = urand(10000, 50000);
|
||||
despawnTimer = 0;
|
||||
if( me->getFaction() == 16 ) // hostile - it's phase 2
|
||||
if (me->GetFaction() == FACTION_MONSTER_2) // hostile - it's phase 2
|
||||
if( Unit* target = me->SelectNearestTarget(250.0f) )
|
||||
{
|
||||
AttackStart(target);
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
{
|
||||
trigger->SetDisplayId(11686);
|
||||
trigger->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
trigger->setFaction(14);
|
||||
trigger->SetFaction(FACTION_MONSTER);
|
||||
trigger->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
{
|
||||
trigger->SetDisplayId(11686);
|
||||
trigger->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
trigger->setFaction(14);
|
||||
trigger->SetFaction(FACTION_MONSTER);
|
||||
trigger->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user