diff options
author | megamage <none@none> | 2008-12-24 10:57:04 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-24 10:57:04 -0600 |
commit | 253f4bf374ccaa83d20a7ff58e31b37300f4a26e (patch) | |
tree | 32ad2585c67269500c961af90f5d561570331b50 /src/game/Unit.cpp | |
parent | c81299e6536e249ca05eebf100f3f350522da7da (diff) |
*Fix the bug that many talents lose one point.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e00b2446010..123dbbcf2eb 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12943,8 +12943,25 @@ bool Unit::IsInRaidWith(Unit const *unit) const return false; } -void Unit::GetRaidMember(std::list<Unit*> &TagUnitMap, float radius) +void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius) { + Player *owner = GetCharmerOrOwnerPlayerOrPlayerItself(); + if(!owner) + return; + + Group *pGroup = owner->GetGroup(); + if(!pGroup) + return; + + for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* Target = itr->getSource(); + + // IsHostileTo check duel and controlled by enemy + if( Target && Target != this && Target->isAlive() + && IsWithinDistInMap(Target, radius) && !IsHostileTo(Target) ) + nearMembers.push_back(Target); + } } void Unit::GetPartyMember(std::list<Unit*> &TagUnitMap, float radius) |