コード例 #1
0
ファイル: Raid_GruulsLair.cpp プロジェクト: Chero/abcwow
	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);
			}
		}
	}
コード例 #2
0
ファイル: blckpsh.c プロジェクト: OpenBOR/OpenBORStats
//Character that blocked will push the attacker back
void main()
{
  if(getlocalvar("self"))
  { knockback(getlocalvar("attacker"), 1); }
}