mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 13:27:15 +00:00
Bot Invite/Accept cleanup
This commit is contained in:
+1
-1
@@ -10115,7 +10115,7 @@ void Bot::StopMoving(float new_heading)
|
||||
|
||||
uint8 Bot::spell_casting_chances[SPELL_TYPE_COUNT][PLAYER_CLASS_COUNT][EQ::constants::STANCE_TYPE_COUNT][cntHSND] = { 0 };
|
||||
|
||||
void Bot::ProcessRaidInvite2(Client* invitee, Client* invitor) {
|
||||
void Bot::ProcessRaidInvite(Client* invitee, Client* invitor) {
|
||||
|
||||
Raid* raid = entity_list.GetRaidByClient(invitor);
|
||||
Group* g_invitee = invitee->GetGroup();
|
||||
|
||||
+2
-2
@@ -362,8 +362,8 @@ public:
|
||||
static std::string RaceIdToString(uint16 raceId);
|
||||
static bool IsBotAttackAllowed(Mob* attacker, Mob* target, bool& hasRuleDefined);
|
||||
static Bot* GetBotByBotClientOwnerAndBotName(Client* c, std::string botName);
|
||||
static void ProcessRaidInvite(Bot* player_accepting_invite, Client* b_owner); //Mitch
|
||||
static void ProcessRaidInvite2(Client* invitee, Client* invitor); //Mitch
|
||||
static void ProcessRaidInvite(Bot* invitee, Client* invitor); //Mitch
|
||||
static void ProcessRaidInvite(Client* invitee, Client* invitor); //Mitch
|
||||
static void ProcessBotGroupInvite(Client* c, std::string botName);
|
||||
static void ProcessBotGroupDisband(Client* c, std::string botName);
|
||||
static void BotOrderCampAll(Client* c);
|
||||
|
||||
+67
-70
@@ -11309,7 +11309,7 @@ void Client::Handle_OP_QueryUCSServerStatus(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
||||
{
|
||||
if (app->size < sizeof(RaidGeneral_Struct)) {
|
||||
LogError("Wrong size: OP_RaidCommand, size=[{}], expected at least [{}]", app->size, sizeof(RaidGeneral_Struct));
|
||||
@@ -11317,43 +11317,42 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
RaidGeneral_Struct *raid_command_packet = (RaidGeneral_Struct*)app->pBuffer;
|
||||
RaidGeneral_Struct* raid_command_packet = (RaidGeneral_Struct*)app->pBuffer;
|
||||
switch (raid_command_packet->action)
|
||||
{
|
||||
case RaidCommandInviteIntoExisting:
|
||||
case RaidCommandInvite: {
|
||||
//Mitch
|
||||
#ifdef BOTS
|
||||
|
||||
#ifdef BOTS //Mitch
|
||||
|
||||
Bot* player_to_invite = nullptr;
|
||||
Client* player_to_invite_owner = nullptr;
|
||||
|
||||
if (entity_list.GetBotByBotName(raid_command_packet->player_name) ) {
|
||||
if (entity_list.GetBotByBotName(raid_command_packet->player_name)) {
|
||||
Bot* player_to_invite = entity_list.GetBotByBotName(raid_command_packet->player_name);
|
||||
Client* player_to_invite_owner = player_to_invite->GetOwner()->CastToClient();
|
||||
Group* player_to_invite_group = player_to_invite->GetGroup();
|
||||
|
||||
if (!player_to_invite) {
|
||||
break;
|
||||
}
|
||||
|
||||
Group* player_to_invite_group = player_to_invite->GetGroup();
|
||||
// Not allowed: Invite a bot that is not owned by the inviter and is not in a group. They could be in a group with their owner!
|
||||
if (player_to_invite->GetOwnerID() != player_to_invite_owner->CharacterID() && !player_to_invite_group) {
|
||||
Message(Chat::Red, "%s is not grouped and not your Bot. You can only invite your Bots, or Bots grouped with others.", player_to_invite->GetName());
|
||||
//Not allowed: Invite a bot that is already within a raid.
|
||||
if (player_to_invite->IsRaidGrouped()) {
|
||||
MessageString(Chat::White, ALREADY_IN_RAID, GetName()); //must invite members not in raid...
|
||||
return;
|
||||
}
|
||||
|
||||
//Not allowed: Invite a bot that is already within a raid.
|
||||
if (player_to_invite->HasRaid()) {
|
||||
Message(Chat::Red, "%s is already in a raid.", player_to_invite->GetName());
|
||||
break;
|
||||
// Not allowed: Invite a bot that is not owned by the invitor
|
||||
if (player_to_invite->IsBot() &&
|
||||
player_to_invite->CastToBot()->GetOwner()->CastToClient()->CharacterID() !=
|
||||
player_to_invite_owner->CharacterID()) {
|
||||
Message(Chat::Red, "%s is not your Bot. You can only invite your Bots, or players grouped with bots.", player_to_invite->GetName());
|
||||
}
|
||||
// Not allowed: Invite a bot that is in a group that is already a member
|
||||
if (player_to_invite_group && player_to_invite_group->IsGroupMember(this)) {
|
||||
MessageString(Chat::Red, ALREADY_IN_PARTY);
|
||||
break;
|
||||
}
|
||||
// Not allowed: Invite a bot that is in a group but not the groupleader
|
||||
if (player_to_invite_group && !player_to_invite_group->IsLeader(player_to_invite)) {
|
||||
Message(Chat::Red, "You can only invite an ungrouped player or group leader to join your raid.");
|
||||
|
||||
// Not allowed: Invite a bot that is in a group but the bot is not the group leader
|
||||
if (player_to_invite_group && !player_to_invite_group->IsLeader(player_to_invite->CastToMob())) {
|
||||
Message(Chat::Red, "You can only invite group leaders or ungrouped bots. Try %s instead.", player_to_invite_group->GetLeader()->GetName());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11403,12 +11402,11 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case RaidCommandAcceptInvite: {
|
||||
Client *player_accepting_invite = entity_list.GetClientByName(raid_command_packet->player_name);
|
||||
Client* player_accepting_invite = entity_list.GetClientByName(raid_command_packet->player_name);
|
||||
|
||||
#ifdef BOTS
|
||||
// If the accepting client is in a group with a Bot, send the invite to Bot:ProcessRaidInvite
|
||||
// If the accepting client is in a group with a Bot or the invitor is in a group with a Bot, send the invite to Bot:ProcessRaidInvite
|
||||
// instead of remaining here.
|
||||
Bot* b = nullptr;
|
||||
Client* invitee = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
@@ -11416,6 +11414,11 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
Group* g_invitee = invitee->GetGroup();
|
||||
Group* g_invitor = invitor->GetGroup();
|
||||
|
||||
if (invitee && invitee->IsRaidGrouped()) {
|
||||
invitor->MessageString(Chat::White, ALREADY_IN_RAID, GetName()); //group failed, must invite members not in raid...
|
||||
return;
|
||||
}
|
||||
|
||||
bool invitor_has_bot = false;
|
||||
bool invitee_has_bot = false;
|
||||
|
||||
@@ -11443,13 +11446,12 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
if (invitor_has_bot || invitee_has_bot) {
|
||||
Bot::ProcessRaidInvite2(invitee, invitor);
|
||||
Bot::ProcessRaidInvite(invitee, invitor); //two clients with one or both having groups with bots
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (invitee->IsBot())
|
||||
else if (invitee->IsBot())
|
||||
{
|
||||
Bot::ProcessRaidInvite(b, player_accepting_invite);
|
||||
Bot::ProcessRaidInvite(b, player_accepting_invite); //client inviting a bot
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11459,10 +11461,10 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
player_accepting_invite->MessageString(Chat::White, ALREADY_IN_RAID, GetName()); //group failed, must invite members not in raid...
|
||||
return;
|
||||
}
|
||||
Raid *raid = entity_list.GetRaidByClient(player_accepting_invite);
|
||||
Raid* raid = entity_list.GetRaidByClient(player_accepting_invite);
|
||||
if (raid) {
|
||||
raid->VerifyRaid();
|
||||
Group *group = GetGroup();
|
||||
Group* group = GetGroup();
|
||||
if (group) {
|
||||
if (group->GroupCount() + raid->RaidCount() > MAX_RAID_MEMBERS) {
|
||||
player_accepting_invite->Message(Chat::Red, "Invite failed, group invite would create a raid larger than the maximum number of members allowed.");
|
||||
@@ -11477,10 +11479,10 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
if (group) {//add us all
|
||||
uint32 free_group_id = raid->GetFreeGroup();
|
||||
Client *addClient = nullptr;
|
||||
Client* addClient = nullptr;
|
||||
for (int x = 0; x < 6; x++) {
|
||||
if (group->members[x]) {
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
if (group->members[x]->IsClient())
|
||||
c = group->members[x]->CastToClient();
|
||||
else
|
||||
@@ -11520,8 +11522,8 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Group *player_invited_group = player_accepting_invite->GetGroup();
|
||||
Group *group = GetGroup();
|
||||
Group* player_invited_group = player_accepting_invite->GetGroup();
|
||||
Group* group = GetGroup();
|
||||
if (group) //if our target has a group
|
||||
{
|
||||
raid = new Raid(player_accepting_invite);
|
||||
@@ -11532,7 +11534,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
|
||||
/* If we already have a group then cycle through adding us... */
|
||||
if (player_invited_group) {
|
||||
Client *client_to_be_leader = nullptr;
|
||||
Client* client_to_be_leader = nullptr;
|
||||
for (int x = 0; x < 6; x++) {
|
||||
if (player_invited_group->members[x]) {
|
||||
if (!client_to_be_leader) {
|
||||
@@ -11542,7 +11544,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
if (player_invited_group->IsLeader(player_invited_group->members[x])) {
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
|
||||
if (player_invited_group->members[x]->IsClient())
|
||||
c = player_invited_group->members[x]->CastToClient();
|
||||
@@ -11559,7 +11561,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
else {
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
|
||||
if (player_invited_group->members[x]->IsClient())
|
||||
c = player_invited_group->members[x]->CastToClient();
|
||||
@@ -11587,7 +11589,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
raid->AddMember(player_accepting_invite, 0xFFFFFFFF, true, false, true);
|
||||
}
|
||||
|
||||
Client *client_to_add = nullptr;
|
||||
Client* client_to_add = nullptr;
|
||||
/* Add client to an existing group */
|
||||
for (int x = 0; x < 6; x++) {
|
||||
if (group->members[x]) {
|
||||
@@ -11598,7 +11600,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
if (group->IsLeader(group->members[x])) {
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
|
||||
if (group->members[x]->IsClient())
|
||||
c = group->members[x]->CastToClient();
|
||||
@@ -11616,7 +11618,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
|
||||
if (group->members[x]->IsClient())
|
||||
c = group->members[x]->CastToClient();
|
||||
@@ -11647,7 +11649,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
|
||||
entity_list.AddRaid(raid);
|
||||
raid->SetRaidDetails();
|
||||
Client *addClientig = nullptr;
|
||||
Client* addClientig = nullptr;
|
||||
for (int x = 0; x < 6; x++) {
|
||||
if (player_invited_group->members[x]) {
|
||||
if (!addClientig) {
|
||||
@@ -11657,7 +11659,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
if (player_invited_group->IsLeader(player_invited_group->members[x])) {
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
|
||||
if (player_invited_group->members[x]->IsClient())
|
||||
c = player_invited_group->members[x]->CastToClient();
|
||||
@@ -11675,7 +11677,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Client *c = nullptr;
|
||||
Client* c = nullptr;
|
||||
if (player_invited_group->members[x]->IsClient())
|
||||
c = player_invited_group->members[x]->CastToClient();
|
||||
else
|
||||
@@ -11722,7 +11724,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
case RaidCommandDisband: {
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
Client* c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
|
||||
if (raid) {
|
||||
@@ -11756,17 +11758,12 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
raid->RemoveMember(raid_command_packet->leader_name);
|
||||
Client *c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
Client* c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
if (c) {
|
||||
#ifdef BOTS
|
||||
//check to see if the leader_name has any bots in the raid
|
||||
//if so, remove them as well
|
||||
|
||||
// for (int i = 0; i < MAX_RAID_MEMBERS; ++i)
|
||||
// {
|
||||
// if (raid->members[i].member && raid->members[i].member->IsBot() && raid->members[i].member->CastToBot()->GetOwner()->CastToClient()->CharacterID() == entity_list.GetClientByName(raid_command_packet->leader_name)->CharacterID())
|
||||
// raid->RemoveMember(raid->members[i].membername);
|
||||
// }
|
||||
//Mitch added to remove all bots if the Bot_Owner is removed from the Raid
|
||||
//Does not camp the Bots, just removes from the raid
|
||||
std::vector<Bot*> raid_members_bots;
|
||||
int owner_id = entity_list.GetClientByName(raid_command_packet->leader_name)->CharacterID();
|
||||
for (int i = 0; i < MAX_RAID_MEMBERS; ++i)
|
||||
@@ -11803,14 +11800,14 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
case RaidCommandMoveGroup:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
/* Moving to group */
|
||||
if (raid_command_packet->parameter < 12) {
|
||||
uint8 group_count = raid->GroupCount(raid_command_packet->parameter);
|
||||
|
||||
if (group_count < 6) {
|
||||
Client *c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
Client* c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
uint32 old_group = raid->GetGroup(raid_command_packet->leader_name);
|
||||
if (raid_command_packet->parameter == old_group) //don't rejoin grp if we order to join same group.
|
||||
break;
|
||||
@@ -11827,7 +11824,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
raid->SetGroupLeader(raid->members[x].membername);
|
||||
raid->UpdateGroupAAs(old_group);
|
||||
|
||||
Client *client_to_update = entity_list.GetClientByName(raid->members[x].membername);
|
||||
Client* client_to_update = entity_list.GetClientByName(raid->members[x].membername);
|
||||
if (client_to_update) {
|
||||
raid->SendRaidRemove(raid->members[x].membername, client_to_update);
|
||||
raid->SendRaidCreate(client_to_update);
|
||||
@@ -11840,7 +11837,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
else {
|
||||
auto pack = new ServerPacket(ServerOP_RaidChangeGroup, sizeof(ServerRaidGeneralAction_Struct));
|
||||
ServerRaidGeneralAction_Struct *raid_command_packet = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
ServerRaidGeneralAction_Struct* raid_command_packet = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
|
||||
raid_command_packet->rid = raid->GetID();
|
||||
raid_command_packet->zoneid = zone->GetZoneID();
|
||||
@@ -11888,17 +11885,17 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
/* Move player to ungrouped bank */
|
||||
else {
|
||||
Client *c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
Client* c = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
uint32 oldgrp = raid->GetGroup(raid_command_packet->leader_name);
|
||||
if (raid->members[raid->GetPlayerIndex(raid_command_packet->leader_name)].IsGroupLeader) {
|
||||
raid->SetGroupLeader(raid_command_packet->leader_name, false);
|
||||
for (int x = 0; x < MAX_RAID_MEMBERS; x++) {
|
||||
if (raid->members[x].GroupNumber == oldgrp && strlen(raid->members[x].membername) > 0 && strcmp(raid->members[x].membername, raid_command_packet->leader_name) != 0){
|
||||
if (raid->members[x].GroupNumber == oldgrp && strlen(raid->members[x].membername) > 0 && strcmp(raid->members[x].membername, raid_command_packet->leader_name) != 0) {
|
||||
|
||||
raid->SetGroupLeader(raid->members[x].membername);
|
||||
raid->UpdateGroupAAs(oldgrp);
|
||||
|
||||
Client *client_leaving_group = entity_list.GetClientByName(raid->members[x].membername);
|
||||
Client* client_leaving_group = entity_list.GetClientByName(raid->members[x].membername);
|
||||
if (client_leaving_group) {
|
||||
raid->SendRaidRemove(raid->members[x].membername, client_leaving_group);
|
||||
raid->SendRaidCreate(client_leaving_group);
|
||||
@@ -11910,8 +11907,8 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
else {
|
||||
auto pack = new ServerPacket( ServerOP_RaidChangeGroup, sizeof(ServerRaidGeneralAction_Struct));
|
||||
ServerRaidGeneralAction_Struct *raid_command = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
auto pack = new ServerPacket(ServerOP_RaidChangeGroup, sizeof(ServerRaidGeneralAction_Struct));
|
||||
ServerRaidGeneralAction_Struct* raid_command = (ServerRaidGeneralAction_Struct*)pack->pBuffer;
|
||||
|
||||
raid_command->rid = raid->GetID();
|
||||
strn0cpy(raid_command->playername, raid->members[x].membername, 64);
|
||||
@@ -11947,7 +11944,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
Client *client_moved = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
Client* client_moved = entity_list.GetClientByName(raid_command_packet->leader_name);
|
||||
|
||||
if (client_moved && client_moved->GetRaid()) {
|
||||
client_moved->GetRaid()->SendHPManaEndPacketsTo(client_moved);
|
||||
@@ -11963,7 +11960,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
case RaidCommandRaidLock:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
if (!raid->IsLocked())
|
||||
raid->LockRaid(true);
|
||||
@@ -11974,7 +11971,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
case RaidCommandRaidUnlock:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid)
|
||||
{
|
||||
if (raid->IsLocked())
|
||||
@@ -11987,7 +11984,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
case RaidCommandLootType2:
|
||||
case RaidCommandLootType:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
Message(Chat::Yellow, "Loot type changed to: %d.", raid_command_packet->parameter);
|
||||
raid->ChangeLootType(raid_command_packet->parameter);
|
||||
@@ -11998,7 +11995,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
case RaidCommandAddLooter2:
|
||||
case RaidCommandAddLooter:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
Message(Chat::Yellow, "Adding %s as a raid looter.", raid_command_packet->leader_name);
|
||||
raid->AddRaidLooter(raid_command_packet->leader_name);
|
||||
@@ -12009,7 +12006,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
case RaidCommandRemoveLooter2:
|
||||
case RaidCommandRemoveLooter:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
Message(Chat::Yellow, "Removing %s as a raid looter.", raid_command_packet->leader_name);
|
||||
raid->RemoveRaidLooter(raid_command_packet->leader_name);
|
||||
@@ -12019,7 +12016,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
|
||||
case RaidCommandMakeLeader:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (raid) {
|
||||
if (strcmp(raid->leadername, GetName()) == 0) {
|
||||
raid->SetRaidLeader(GetName(), raid_command_packet->leader_name);
|
||||
@@ -12032,11 +12029,11 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
|
||||
case RaidCommandSetMotd:
|
||||
{
|
||||
Raid *raid = entity_list.GetRaidByClient(this);
|
||||
Raid* raid = entity_list.GetRaidByClient(this);
|
||||
if (!raid)
|
||||
break;
|
||||
// we don't use the RaidGeneral here!
|
||||
RaidMOTD_Struct *motd = (RaidMOTD_Struct *)app->pBuffer;
|
||||
RaidMOTD_Struct* motd = (RaidMOTD_Struct*)app->pBuffer;
|
||||
raid->SetRaidMOTD(std::string(motd->motd));
|
||||
raid->SaveRaidMOTD();
|
||||
raid->SendRaidMOTDToWorld();
|
||||
|
||||
Reference in New Issue
Block a user