diff options
author | thesensei <aconstantgoal@abv.bg> | 2012-09-21 00:07:56 +0300 |
---|---|---|
committer | thesensei <aconstantgoal@abv.bg> | 2012-09-21 00:07:56 +0300 |
commit | e34b7e70c54522e8ae933fffddaae04136b48103 (patch) | |
tree | 1850fc6008d43c2b1a489cd0611bcf783a68bf5a | |
parent | 1f03439fc2365a751febbfe86ab823b55daa040e (diff) |
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.
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.cpp | 3 | ||||
-rwxr-xr-x | src/server/game/Conditions/ConditionMgr.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 546c4f303b2..7dc4b57d188 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -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; } } } diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index bd72015d76f..57af0562dcd 100755 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -144,6 +144,7 @@ enum RelationType RELATION_IN_RAID_OR_PARTY, RELATION_OWNED_BY, RELATION_PASSENGER_OF, + RELATION_CREATED_BY, RELATION_MAX }; |