mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 22:49:39 -04:00
*Change vehicle faction the same as the driver's when driver enters it.
*Fix 3593 sql. --HG-- branch : trunk
This commit is contained in:
+6
-6
@@ -13626,16 +13626,16 @@ void Unit::RestoreFaction()
|
||||
((Player*)this)->setFactionForRace(getRace());
|
||||
else
|
||||
{
|
||||
CreatureInfo const *cinfo = ((Creature*)this)->GetCreatureInfo();
|
||||
|
||||
if(((Creature*)this)->isPet())
|
||||
if(((Creature*)this)->HasSummonMask(SUMMON_MASK_MINION))
|
||||
{
|
||||
if(Unit* owner = GetOwner())
|
||||
{
|
||||
setFaction(owner->getFaction());
|
||||
else if(cinfo)
|
||||
setFaction(cinfo->faction_A);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(cinfo) // normal creature
|
||||
|
||||
if(CreatureInfo const *cinfo = ((Creature*)this)->GetCreatureInfo()) // normal creature
|
||||
setFaction(cinfo->faction_A);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user