Manners Matter
-
Posts
1 -
Joined
-
Last visited
-
Donations
0.00 GBP
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use
Shaman Totems
-
-
-
-
-
in Mangos One
Posted
I have one simple fix for this issue. Traps need to check target before trigger: GameObject.cpp - Trap trigger ,so we need to improve conditions in AnyUnfriendlyUnitInObjectRangeCheck ==> GridNotifiers.h
Code:
class AnyUnfriendlyUnitInObjectRangeCheck
{
public:
AnyUnfriendlyUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range)
{
i_controlledByPlayer = obj->IsControlledByPlayer();
}
WorldObject const& GetFocusObject() const { return *i_obj; }
bool operator()(Unit* u)
{
+// ignore totems
+if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem())
+{
+ return false;
+}
if (u->IsAlive() && (i_controlledByPlayer ? !i_obj->IsFriendlyTo(u) : i_obj->IsHostileTo(u))
&& i_obj->IsWithinDistInMap(u, i_range))
{ return true; }
else
{
return false;
}
}
private:
WorldObject const* i_obj;
bool i_controlledByPlayer;
float i_range;
};