View Single Post
  #2  
Old 08-08-2015, 10:23 PM
kilst87
Sarnak
 
Join Date: Dec 2008
Location: sydney
Posts: 35
Default

Edit: Actually that doesn't work after lots more testing.

Instead, replace the whole loop:

Code:
for(int i = 0; i < 3; i++){
    healer->ClearHealRotationMembers();
    healer->ClearHealRotationTargets();
    healer->AddHealRotationTarget(entity_list.GetMob(_healRotationTargets[i]));
}
starting at line at line 12903

with:

Code:
for (int i = 0; i < MaxHealRotationTargets; i++)
{
    if (_healRotationTargets[i] != 0)
        healer->AddHealRotationTarget(entity_list.GetMob(_healRotationTargets[i]));
}
Only problem now is that healers only switch tanks on feign deaths that fail

Re-Edit:

Code:
Mob* Bot::GetHealRotationTarget( ) {
    Mob* tank = nullptr;
    Mob* first = nullptr;
    Mob* target = nullptr;
    int removeIndex = 0;
    for(int i = 0; i < MaxHealRotationTargets; i++) {
	    if(_healRotationTargets[i] != 0) {
		    target = entity_list.GetMob(_healRotationTargets[i]);
		    if(target) {
			    if(target->GetZoneID() == GetZoneID() && (!(target->GetAppearance() == eaDead) && !(target->IsClient() && target->CastToClient()->GetFeigned()))) {
				    if(!first)
					    first = target;

                                              Etc, etc.......
}
Bolded line is the line in question.

And that should fix the feign death bug. Tested, but not very thoroughly.
Reply With Quote