mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ enum RelationType
|
||||
RELATION_IN_RAID_OR_PARTY,
|
||||
RELATION_OWNED_BY,
|
||||
RELATION_PASSENGER_OF,
|
||||
RELATION_CREATED_BY,
|
||||
RELATION_MAX
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user