Updated bot casting roles to not refresh with every spell cast (oversight in recent casting chances commit)

This commit is contained in:
Uleat
2017-02-24 04:48:33 -05:00
parent 72ed770037
commit 3383f65ff7
5 changed files with 147 additions and 59 deletions
+20
View File
@@ -347,6 +347,10 @@ bool Group::AddMember(Mob* newmember, const char *NewMemberName, uint32 Characte
safe_delete(outapp);
#ifdef BOTS
Bot::UpdateGroupCastingRoles(this);
#endif
return true;
}
@@ -481,6 +485,10 @@ bool Group::UpdatePlayer(Mob* update){
if (update->IsClient() && !mentoree && mentoree_name.length() && !mentoree_name.compare(update->GetName()))
mentoree = update->CastToClient();
#ifdef BOTS
Bot::UpdateGroupCastingRoles(this);
#endif
return updateSuccess;
}
@@ -513,6 +521,10 @@ void Group::MemberZoned(Mob* removemob) {
if (removemob->IsClient() && removemob == mentoree)
mentoree = nullptr;
#ifdef BOTS
Bot::UpdateGroupCastingRoles(this);
#endif
}
void Group::SendGroupJoinOOZ(Mob* NewMember) {
@@ -721,6 +733,10 @@ bool Group::DelMember(Mob* oldmember, bool ignoresender)
ClearAllNPCMarks();
}
#ifdef BOTS
Bot::UpdateGroupCastingRoles(this);
#endif
return true;
}
@@ -864,6 +880,10 @@ uint32 Group::GetTotalGroupDamage(Mob* other) {
}
void Group::DisbandGroup(bool joinraid) {
#ifdef BOTS
Bot::UpdateGroupCastingRoles(this, true);
#endif
auto outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupUpdate_Struct));
GroupUpdate_Struct* gu = (GroupUpdate_Struct*) outapp->pBuffer;