mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-28 03:12:28 +00:00
Some work on RoF Guild Banks (still not functional).
This commit is contained in:
parent
5465d76d20
commit
96820c4a31
@ -5741,14 +5741,14 @@ void Client::GuildBankAck()
|
|||||||
FastQueuePacket(&outapp);
|
FastQueuePacket(&outapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::GuildBankDepositAck(bool Fail)
|
void Client::GuildBankDepositAck(bool Fail, int8 action)
|
||||||
{
|
{
|
||||||
|
|
||||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildBank, sizeof(GuildBankDepositAck_Struct));
|
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildBank, sizeof(GuildBankDepositAck_Struct));
|
||||||
|
|
||||||
GuildBankDepositAck_Struct *gbdas = (GuildBankDepositAck_Struct*) outapp->pBuffer;
|
GuildBankDepositAck_Struct *gbdas = (GuildBankDepositAck_Struct*) outapp->pBuffer;
|
||||||
|
|
||||||
gbdas->Action = GuildBankDeposit;
|
gbdas->Action = action;
|
||||||
|
|
||||||
gbdas->Fail = Fail ? 1 : 0;
|
gbdas->Fail = Fail ? 1 : 0;
|
||||||
|
|
||||||
|
|||||||
@ -1097,7 +1097,7 @@ public:
|
|||||||
QGlobalCache *GetQGlobals() { return qGlobals; }
|
QGlobalCache *GetQGlobals() { return qGlobals; }
|
||||||
QGlobalCache *CreateQGlobals() { qGlobals = new QGlobalCache(); return qGlobals; }
|
QGlobalCache *CreateQGlobals() { qGlobals = new QGlobalCache(); return qGlobals; }
|
||||||
void GuildBankAck();
|
void GuildBankAck();
|
||||||
void GuildBankDepositAck(bool Fail);
|
void GuildBankDepositAck(bool Fail, int8 action);
|
||||||
inline bool IsGuildBanker() { return GuildBanker; }
|
inline bool IsGuildBanker() { return GuildBanker; }
|
||||||
void ClearGuildBank();
|
void ClearGuildBank();
|
||||||
void SendGroupCreatePacket();
|
void SendGroupCreatePacket();
|
||||||
|
|||||||
@ -6843,13 +6843,28 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
|||||||
char *Buffer = (char *)app->pBuffer;
|
char *Buffer = (char *)app->pBuffer;
|
||||||
|
|
||||||
uint32 Action = VARSTRUCT_DECODE_TYPE(uint32, Buffer);
|
uint32 Action = VARSTRUCT_DECODE_TYPE(uint32, Buffer);
|
||||||
|
uint32 sentAction = Action;
|
||||||
|
|
||||||
|
if (GetClientVersion() >= EQClientRoF)
|
||||||
|
{
|
||||||
|
Action += 1;
|
||||||
|
/*
|
||||||
|
// Need to find all of the action types for RoF and switch case here
|
||||||
|
switch(Action)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
Action = 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsInAGuild())
|
if (!IsInAGuild())
|
||||||
{
|
{
|
||||||
Message(13, "You must be in a Guild to use the Guild Bank.");
|
Message(13, "You must be in a Guild to use the Guild Bank.");
|
||||||
|
|
||||||
if (Action == GuildBankDeposit)
|
if (Action == GuildBankDeposit)
|
||||||
GuildBankDepositAck(true);
|
GuildBankDepositAck(true, sentAction);
|
||||||
else
|
else
|
||||||
GuildBankAck();
|
GuildBankAck();
|
||||||
|
|
||||||
@ -6876,7 +6891,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
|||||||
{
|
{
|
||||||
Message_StringID(13, GUILD_BANK_FULL);
|
Message_StringID(13, GUILD_BANK_FULL);
|
||||||
|
|
||||||
GuildBankDepositAck(true);
|
GuildBankDepositAck(true, sentAction);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -6925,7 +6940,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
|||||||
{
|
{
|
||||||
Message_StringID(13, GUILD_BANK_FULL);
|
Message_StringID(13, GUILD_BANK_FULL);
|
||||||
|
|
||||||
GuildBankDepositAck(true);
|
GuildBankDepositAck(true, sentAction);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -6938,7 +6953,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
|||||||
{
|
{
|
||||||
Message(13, "No Item on the cursor.");
|
Message(13, "No Item on the cursor.");
|
||||||
|
|
||||||
GuildBankDepositAck(true);
|
GuildBankDepositAck(true, sentAction);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -6969,14 +6984,14 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
|||||||
if (!Allowed)
|
if (!Allowed)
|
||||||
{
|
{
|
||||||
Message_StringID(13, GUILD_BANK_CANNOT_DEPOSIT);
|
Message_StringID(13, GUILD_BANK_CANNOT_DEPOSIT);
|
||||||
GuildBankDepositAck(true);
|
GuildBankDepositAck(true, sentAction);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GuildBanks->AddItem(GuildID(), GuildBankDepositArea, CursorItem->ID, CursorItemInst->GetCharges(), GetName(), GuildBankBankerOnly, ""))
|
if (GuildBanks->AddItem(GuildID(), GuildBankDepositArea, CursorItem->ID, CursorItemInst->GetCharges(), GetName(), GuildBankBankerOnly, ""))
|
||||||
{
|
{
|
||||||
GuildBankDepositAck(false);
|
GuildBankDepositAck(false, sentAction);
|
||||||
|
|
||||||
DeleteItemInInventory(MainCursor, 0, false);
|
DeleteItemInInventory(MainCursor, 0, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1336,7 +1336,7 @@ void Merc::AI_Process() {
|
|||||||
if(IsCasting())
|
if(IsCasting())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// A bot wont start its AI if not grouped
|
// A merc wont start its AI if not grouped
|
||||||
if(!HasGroup()) {
|
if(!HasGroup()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -5474,7 +5474,7 @@ bool Client::MercOnlyOrNoGroup() {
|
|||||||
}
|
}
|
||||||
if (GetMerc())
|
if (GetMerc())
|
||||||
{
|
{
|
||||||
if (GetMerc()->HasGroup() && GetMerc()->GetGroup() == GetGroup())
|
if (GetMerc()->GetGroup() == GetGroup())
|
||||||
{
|
{
|
||||||
if (GetGroup()->GroupCount() < 3)
|
if (GetGroup()->GroupCount() < 3)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user