mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-17 21:39:52 -04:00
*Wintersgrasp - prevents team from using vehicles to damage their own buildings, by Spp
*Wintersgrasp - restore proper faction of units in Unit::RestoreFaction(), don't just always use faction_A, by Spp --HG-- branch : trunk
This commit is contained in:
+4
-1
@@ -14291,7 +14291,10 @@ void Unit::RestoreFaction()
|
||||
}
|
||||
|
||||
if(CreatureInfo const *cinfo = ((Creature*)this)->GetCreatureInfo()) // normal creature
|
||||
setFaction(cinfo->faction_A);
|
||||
{
|
||||
FactionTemplateEntry const *faction = getFactionTemplateEntry();
|
||||
setFaction((faction && faction->friendlyMask & 0x004) ? cinfo->faction_H : cinfo->faction_A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user