*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:
1 parent
f413a98862
commit
8a5ac3834d
3 files changed
+42
-2
No files matched your search
+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