Merge branch 'master' into random

This commit is contained in:
Michael Cook (mackal) 2014-12-03 17:04:58 -05:00
commit 5998cf8a3c
2 changed files with 23 additions and 32 deletions

View File

@ -312,7 +312,7 @@
9056|2014_11_08_RaidMembers.sql|SHOW COLUMNS FROM `raid_members` LIKE 'groupid'|missing|unsigned 9056|2014_11_08_RaidMembers.sql|SHOW COLUMNS FROM `raid_members` LIKE 'groupid'|missing|unsigned
9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty| 9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
9058|2014_11_26_InventoryTableUpdate.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornamenticon'|empty| 9058|2014_11_26_InventoryTableUpdate.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornamenticon'|empty|
9059|2014_11_30_mercs_table_update.sql|SHOW COLUMNS FROM `mercs` LIKE 'MercSize'|empty| 9059|2014_12_01_mercs_table_update.sql|SHOW COLUMNS FROM `mercs` LIKE 'MercSize'|empty|
# Upgrade conditions: # Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not # This won't be needed after this system is implemented, but it is used database that are not

View File

@ -10617,37 +10617,28 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
case RaidCommandInviteIntoExisting: case RaidCommandInviteIntoExisting:
case RaidCommandInvite: { case RaidCommandInvite: {
Client *i = entity_list.GetClientByName(ri->player_name); Client *i = entity_list.GetClientByName(ri->player_name);
if (i){ if (!i)
Group *g = i->GetGroup(); break;
if (g){ Group *g = i->GetGroup();
if (g->IsLeader(i) == false) // These two messages should be generated by the client I think, just do this for now
Message(13, "You can only invite an ungrouped player or group leader to join your raid."); if (i->HasRaid()) {
else{ Message(13, "%s is already in a raid.", i->GetName());
//This sends an "invite" to the client in question. break;
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidGeneral_Struct));
RaidGeneral_Struct *rg = (RaidGeneral_Struct*)outapp->pBuffer;
strn0cpy(rg->leader_name, ri->leader_name, 64);
strn0cpy(rg->player_name, ri->player_name, 64);
rg->parameter = 0;
rg->action = 20;
i->QueuePacket(outapp);
safe_delete(outapp);
}
}
else{
//This sends an "invite" to the client in question.
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidGeneral_Struct));
RaidGeneral_Struct *rg = (RaidGeneral_Struct*)outapp->pBuffer;
strn0cpy(rg->leader_name, ri->leader_name, 64);
strn0cpy(rg->player_name, ri->player_name, 64);
rg->parameter = 0;
rg->action = 20;
i->QueuePacket(outapp);
safe_delete(outapp);
}
} }
if (g && !g->IsLeader(i)) {
Message(13, "You can only invite an ungrouped player or group leader to join your raid.");
break;
}
//This sends an "invite" to the client in question.
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidGeneral_Struct));
RaidGeneral_Struct *rg = (RaidGeneral_Struct*)outapp->pBuffer;
strn0cpy(rg->leader_name, ri->leader_name, 64);
strn0cpy(rg->player_name, ri->player_name, 64);
rg->parameter = 0;
rg->action = 20;
i->QueuePacket(outapp);
safe_delete(outapp);
break; break;
} }
case RaidCommandAcceptInvite: { case RaidCommandAcceptInvite: {