Rework how XTarget auto haters work

This should cause the auto haters to be shared with other toons who might be
interested (group/raid) like live.

There maybe some bugs since there is a lot of complex interactions here.
This commit is contained in:
Michael Cook (mackal)
2017-02-17 21:04:48 -05:00
parent 8177f7d9bb
commit 9f4604ec3e
14 changed files with 435 additions and 71 deletions
+5
View File
@@ -897,6 +897,9 @@ void WorldServer::Process() {
Inviter->CastToClient()->SendGroupLeaderChangePacket(Inviter->GetName());
Inviter->CastToClient()->SendGroupJoinAcknowledge();
}
group->GetXTargetAutoMgr()->merge(*Inviter->CastToClient()->GetXTargetAutoMgr());
Inviter->CastToClient()->GetXTargetAutoMgr()->clear();
Inviter->CastToClient()->SetXTargetAutoMgr(group->GetXTargetAutoMgr());
}
if(!group)
@@ -1011,6 +1014,7 @@ void WorldServer::Process() {
group->SetGroupMentor(mentor_percent, mentoree_name);
}
client->JoinGroupXTargets(group);
}
else if (client->GetMerc())
{
@@ -1109,6 +1113,7 @@ void WorldServer::Process() {
r->SendRaidRemoveAll(rga->playername);
Client *rem = entity_list.GetClientByName(rga->playername);
if(rem){
rem->LeaveRaidXTargets(r);
r->SendRaidDisband(rem);
}
r->LearnMembers();