void groundSlam() { if (_unit->GetAIInterface()->getAITargetsCount() == 0) return; TargetMap *targets = _unit->GetAIInterface()->GetAITargets(); for (TargetMap::iterator itr = targets->begin(); itr != targets->end(); itr++) { Unit *temp = _unit->GetMapMgr()->GetUnit(itr->first); if (temp->GetTypeId() == TYPEID_PLAYER && temp->isAlive()) { knockback(temp); temp->CastSpell(temp, GROUND_SLAM, true); } } }
//Character that blocked will push the attacker back void main() { if(getlocalvar("self")) { knockback(getlocalvar("attacker"), 1); } }