Implement Raid MOTD for UF

Don't forget to source 2014_10_11_RaidMOTD.sql

SoD and RoF implementations still to come
This commit is contained in:
Michael Cook (mackal)
2014-10-11 01:14:11 -04:00
parent 66cfb2e32b
commit 35049d530e
11 changed files with 158 additions and 12 deletions
+16 -2
View File
@@ -565,6 +565,7 @@ void Client::CompleteConnect()
raid->SendRaidAdd(GetName(), this);
raid->SendBulkRaid(this);
raid->SendGroupUpdate(this);
raid->SendRaidMOTD(this);
uint32 grpID = raid->GetGroup(GetName());
if (grpID < 12){
raid->SendRaidGroupRemove(GetName(), grpID);
@@ -10656,8 +10657,8 @@ void Client::Handle_OP_PVPLeaderBoardRequest(const EQApplicationPacket *app)
void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
{
if (app->size != sizeof(RaidGeneral_Struct)) {
LogFile->write(EQEMuLog::Error, "Wrong size: OP_RaidCommand, size=%i, expected %i", app->size, sizeof(RaidGeneral_Struct));
if (app->size < sizeof(RaidGeneral_Struct)) {
LogFile->write(EQEMuLog::Error, "Wrong size: OP_RaidCommand, size=%i, expected at least %i", app->size, sizeof(RaidGeneral_Struct));
DumpPacket(app);
return;
}
@@ -11219,6 +11220,19 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
break;
}
case RaidCommandSetMotd:
{
Raid *r = entity_list.GetRaidByClient(this);
if (!r)
break;
// we don't use the RaidGeneral here!
RaidMOTD_Struct *motd = (RaidMOTD_Struct *)app->pBuffer;
r->SetRaidMOTD(std::string(motd->motd));
r->SaveRaidMOTD();
r->SendRaidMOTDToWorld();
break;
}
default: {
Message(13, "Raid command (%d) NYI", ri->action);
break;