void GetOtherSentinels(Unit* who) { bool *chosenAbilities = new bool[9]; memset(chosenAbilities, 0, 9*sizeof(bool)); selectAbility(pickAbilityRandom(chosenAbilities)); ClearBuddyList(); AddSentinelsNear(me); int bli; for (bli = 0; bli < 3; ++bli) { if (!NearbyGUID[bli]) break; Creature* pNearby = Unit::GetCreature(*me, NearbyGUID[bli]); if (!pNearby) break; AddSentinelsNear(pNearby); CAST_AI(aqsentinelAI, pNearby->AI())->gatherOthersWhenAggro = false; CAST_AI(aqsentinelAI, pNearby->AI())->selectAbility(pickAbilityRandom(chosenAbilities)); } /*if (bli < 3) DoYell("I dont have enough buddies.", LANG_NEUTRAL, 0);*/ SendMyListToBuddies(); CallBuddiesToAttack(who); delete[] chosenAbilities; }
void GetOtherSentinels(Unit* who) { bool *chosenAbilities = new bool[9]; memset(chosenAbilities, 0, 9*sizeof(bool)); selectAbility(pickAbilityRandom(chosenAbilities)); ClearBudyList(); AddSentinelsNear(me); int bli; for (bli = 0; bli < 3; ++bli) { if (!nearby[bli]) break; AddSentinelsNear(nearby[bli]); ((aqsentinelAI *)nearby[bli]->AI())->gatherOthersWhenAggro = false; ((aqsentinelAI *)nearby[bli]->AI())->selectAbility(pickAbilityRandom(chosenAbilities)); } /*if (bli < 3) DoYell("I dont have enough buddies.", LANG_NEUTRAL, 0);*/ SendMyListToBuddies(); CallBuddiesToAttack(who); }