Core/Conditions: Add relation to creator

* This is used in spells with effect summon where the summoned creature doesn't get a *summonedby* flag and so relation to owner is not working. This way the unit get relation to the master who created it.
* World case where I'm going to use this is summoning Oculus drakes
* Blizzard seems to handle such cases with special spells in dbc that are missing and sniff gives nothing for them.  The number of spells is unknown, but existence of atleast 10 is seen. They are used usually as bonus effects to make the check however mechanic is unknown. Guessing it is good as adding this.
This commit is contained in:
thesensei
2012-09-21 00:07:56 +03:00
parent 1f03439fc2
commit e34b7e70c5
2 changed files with 4 additions and 0 deletions

View File

@@ -223,6 +223,9 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
case RELATION_PASSENGER_OF:
condMeets = unit->IsOnVehicle(toUnit);
break;
case RELATION_CREATED_BY:
condMeets = unit->GetCreatorGUID() == toUnit->GetGUID();
break;
}
}
}

View File

@@ -144,6 +144,7 @@ enum RelationType
RELATION_IN_RAID_OR_PARTY,
RELATION_OWNED_BY,
RELATION_PASSENGER_OF,
RELATION_CREATED_BY,
RELATION_MAX
};