*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:
maximius
2009-10-13 16:16:45 -07:00
parent f413a98862
commit 8a5ac3834d
3 changed files with 42 additions and 2 deletions
+4 -1
View File
@@ -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);
}
}
}