mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
commit
24d2a5723b
@ -257,7 +257,7 @@ namespace EQ
|
|||||||
resend_delay_min = 150;
|
resend_delay_min = 150;
|
||||||
resend_delay_max = 5000;
|
resend_delay_max = 5000;
|
||||||
connect_delay_ms = 500;
|
connect_delay_ms = 500;
|
||||||
stale_connection_ms = 30000;
|
stale_connection_ms = 60000;
|
||||||
connect_stale_ms = 5000;
|
connect_stale_ms = 5000;
|
||||||
crc_length = 2;
|
crc_length = 2;
|
||||||
max_packet_size = 512;
|
max_packet_size = 512;
|
||||||
|
|||||||
@ -471,7 +471,7 @@ static void ProcessCommandIgnore(Client *c, std::string Ignoree) {
|
|||||||
Clientlist::Clientlist(int ChatPort) {
|
Clientlist::Clientlist(int ChatPort) {
|
||||||
EQStreamManagerInterfaceOptions chat_opts(ChatPort, false, false);
|
EQStreamManagerInterfaceOptions chat_opts(ChatPort, false, false);
|
||||||
chat_opts.opcode_size = 1;
|
chat_opts.opcode_size = 1;
|
||||||
chat_opts.daybreak_options.stale_connection_ms = 300000;
|
chat_opts.daybreak_options.stale_connection_ms = 600000;
|
||||||
chat_opts.daybreak_options.resend_delay_ms = RuleI(Network, ResendDelayBaseMS);
|
chat_opts.daybreak_options.resend_delay_ms = RuleI(Network, ResendDelayBaseMS);
|
||||||
chat_opts.daybreak_options.resend_delay_factor = RuleR(Network, ResendDelayFactor);
|
chat_opts.daybreak_options.resend_delay_factor = RuleR(Network, ResendDelayFactor);
|
||||||
chat_opts.daybreak_options.resend_delay_min = RuleI(Network, ResendDelayMinMS);
|
chat_opts.daybreak_options.resend_delay_min = RuleI(Network, ResendDelayMinMS);
|
||||||
|
|||||||
@ -104,6 +104,7 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
char_name[0] = 0;
|
char_name[0] = 0;
|
||||||
charid = 0;
|
charid = 0;
|
||||||
zone_waiting_for_bootup = 0;
|
zone_waiting_for_bootup = 0;
|
||||||
|
enter_world_triggered = false;
|
||||||
StartInTutorial = false;
|
StartInTutorial = false;
|
||||||
|
|
||||||
m_ClientVersion = eqs->ClientVersion();
|
m_ClientVersion = eqs->ClientVersion();
|
||||||
@ -1118,6 +1119,7 @@ bool Client::Process() {
|
|||||||
Log(Logs::General, Logs::World_Server, "Zone bootup timer expired, bootup failed or too slow.");
|
Log(Logs::General, Logs::World_Server, "Zone bootup timer expired, bootup failed or too slow.");
|
||||||
TellClientZoneUnavailable();
|
TellClientZoneUnavailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(connect.Check()){
|
if(connect.Check()){
|
||||||
SendGuildList();// Send OPCode: OP_GuildsList
|
SendGuildList();// Send OPCode: OP_GuildsList
|
||||||
SendApproveWorld();
|
SendApproveWorld();
|
||||||
@ -1189,13 +1191,18 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
else
|
else
|
||||||
zone_server = zoneserver_list.FindByZoneID(zone_id);
|
zone_server = zoneserver_list.FindByZoneID(zone_id);
|
||||||
|
|
||||||
//Tell all the zones to drop any client with this lsid because we're coming back in.
|
|
||||||
zoneserver_list.DropClient(GetLSID());
|
|
||||||
|
|
||||||
const char *zone_name = database.GetZoneName(zone_id, true);
|
const char *zone_name = database.GetZoneName(zone_id, true);
|
||||||
if (zone_server) {
|
if (zone_server) {
|
||||||
// warn the world we're comming, so it knows not to shutdown
|
if (false == enter_world_triggered) {
|
||||||
|
//Drop any clients we own in other zones.
|
||||||
|
zoneserver_list.DropClient(GetLSID(), zone_server);
|
||||||
|
|
||||||
|
// warn the zone we're coming
|
||||||
zone_server->IncomingClient(this);
|
zone_server->IncomingClient(this);
|
||||||
|
|
||||||
|
//tell the server not to trigger this multiple times before we get a zone unavailable
|
||||||
|
enter_world_triggered = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (TryBootup) {
|
if (TryBootup) {
|
||||||
@ -1214,9 +1221,17 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
zone_waiting_for_bootup = 0;
|
zone_waiting_for_bootup = 0;
|
||||||
|
|
||||||
if(!cle) {
|
if (GetAdmin() < 80 && zoneserver_list.IsZoneLocked(zone_id)) {
|
||||||
|
Log(Logs::General, Logs::World_Server, "Enter world failed. Zone is locked.");
|
||||||
|
TellClientZoneUnavailable();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!cle) {
|
||||||
|
TellClientZoneUnavailable();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1233,12 +1248,6 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (seen_character_select) {
|
if (seen_character_select) {
|
||||||
if (GetAdmin() < 80 && zoneserver_list.IsZoneLocked(zone_id)) {
|
|
||||||
Log(Logs::General, Logs::World_Server, "Enter world failed. Zone is locked.");
|
|
||||||
TellClientZoneUnavailable();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto pack = new ServerPacket;
|
auto pack = new ServerPacket;
|
||||||
pack->opcode = ServerOP_AcceptWorldEntrance;
|
pack->opcode = ServerOP_AcceptWorldEntrance;
|
||||||
pack->size = sizeof(WorldToZone_Struct);
|
pack->size = sizeof(WorldToZone_Struct);
|
||||||
@ -1358,6 +1367,7 @@ void Client::TellClientZoneUnavailable() {
|
|||||||
|
|
||||||
zone_id = 0;
|
zone_id = 0;
|
||||||
zone_waiting_for_bootup = 0;
|
zone_waiting_for_bootup = 0;
|
||||||
|
enter_world_triggered = false;
|
||||||
autobootup_timeout.Disable();
|
autobootup_timeout.Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,7 @@ private:
|
|||||||
bool is_player_zoning;
|
bool is_player_zoning;
|
||||||
Timer autobootup_timeout;
|
Timer autobootup_timeout;
|
||||||
uint32 zone_waiting_for_bootup;
|
uint32 zone_waiting_for_bootup;
|
||||||
|
bool enter_world_triggered;
|
||||||
|
|
||||||
bool StartInTutorial;
|
bool StartInTutorial;
|
||||||
EQEmu::versions::ClientVersion m_ClientVersion;
|
EQEmu::versions::ClientVersion m_ClientVersion;
|
||||||
|
|||||||
@ -708,11 +708,16 @@ void ZSList::WorldShutDown(uint32 time, uint32 interval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZSList::DropClient(uint32 lsid) {
|
void ZSList::DropClient(uint32 lsid, ZoneServer *ignore_zoneserver) {
|
||||||
ServerPacket packet(ServerOP_DropClient, sizeof(ServerZoneDropClient_Struct));
|
ServerPacket packet(ServerOP_DropClient, sizeof(ServerZoneDropClient_Struct));
|
||||||
auto drop = (ServerZoneDropClient_Struct*)packet.pBuffer;
|
auto drop = (ServerZoneDropClient_Struct*)packet.pBuffer;
|
||||||
drop->lsid = lsid;
|
drop->lsid = lsid;
|
||||||
SendPacket(&packet);
|
|
||||||
|
for (auto &zs : zone_server_list) {
|
||||||
|
if (zs.get() != ignore_zoneserver) {
|
||||||
|
zs->SendPacket(&packet);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZSList::OnTick(EQ::Timer *t)
|
void ZSList::OnTick(EQ::Timer *t)
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public:
|
|||||||
void SOPZoneBootup(const char *adminname, uint32 ZoneServerID, const char *zonename, bool iMakeStatic = false);
|
void SOPZoneBootup(const char *adminname, uint32 ZoneServerID, const char *zonename, bool iMakeStatic = false);
|
||||||
void UpdateUCSServerAvailable(bool ucss_available = true);
|
void UpdateUCSServerAvailable(bool ucss_available = true);
|
||||||
void WorldShutDown(uint32 time, uint32 interval);
|
void WorldShutDown(uint32 time, uint32 interval);
|
||||||
void DropClient(uint32 lsid);
|
void DropClient(uint32 lsid, ZoneServer *ignore_zoneserver);
|
||||||
|
|
||||||
ZoneServer* FindByPort(uint16 port);
|
ZoneServer* FindByPort(uint16 port);
|
||||||
ZoneServer* FindByID(uint32 ZoneID);
|
ZoneServer* FindByID(uint32 ZoneID);
|
||||||
|
|||||||
@ -489,7 +489,7 @@ void Client::ResetAA() {
|
|||||||
database.DeleteCharacterLeadershipAAs(CharacterID());
|
database.DeleteCharacterLeadershipAAs(CharacterID());
|
||||||
// undefined for these clients
|
// undefined for these clients
|
||||||
if (ClientVersionBit() & EQEmu::versions::maskTitaniumAndEarlier)
|
if (ClientVersionBit() & EQEmu::versions::maskTitaniumAndEarlier)
|
||||||
Kick();
|
Kick("AA Reset on client that doesn't support it");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::SendClearAA()
|
void Client::SendClearAA()
|
||||||
|
|||||||
@ -846,7 +846,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
|||||||
{
|
{
|
||||||
if(AttemptedMessages > RuleI(Chat, MaxMessagesBeforeKick))
|
if(AttemptedMessages > RuleI(Chat, MaxMessagesBeforeKick))
|
||||||
{
|
{
|
||||||
Kick();
|
Kick("Sent too many chat messages at once.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(GlobalChatLimiterTimer)
|
if(GlobalChatLimiterTimer)
|
||||||
@ -2587,13 +2587,19 @@ void Client::SetPVP(bool toggle, bool message) {
|
|||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::Kick(const std::string &reason) {
|
||||||
|
client_state = CLIENT_KICKED;
|
||||||
|
|
||||||
|
Log(Logs::General, Logs::Client_Login, "Client [%s] kicked, reason [%s]", GetCleanName(), reason.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
void Client::WorldKick() {
|
void Client::WorldKick() {
|
||||||
auto outapp = new EQApplicationPacket(OP_GMKick, sizeof(GMKick_Struct));
|
auto outapp = new EQApplicationPacket(OP_GMKick, sizeof(GMKick_Struct));
|
||||||
GMKick_Struct* gmk = (GMKick_Struct *)outapp->pBuffer;
|
GMKick_Struct* gmk = (GMKick_Struct *)outapp->pBuffer;
|
||||||
strcpy(gmk->name,GetName());
|
strcpy(gmk->name,GetName());
|
||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
Kick();
|
Kick("World kick issued");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::GMKill() {
|
void Client::GMKill() {
|
||||||
|
|||||||
@ -371,9 +371,9 @@ public:
|
|||||||
inline bool ClientDataLoaded() const { return client_data_loaded; }
|
inline bool ClientDataLoaded() const { return client_data_loaded; }
|
||||||
inline bool Connected() const { return (client_state == CLIENT_CONNECTED); }
|
inline bool Connected() const { return (client_state == CLIENT_CONNECTED); }
|
||||||
inline bool InZone() const { return (client_state == CLIENT_CONNECTED || client_state == CLIENT_LINKDEAD); }
|
inline bool InZone() const { return (client_state == CLIENT_CONNECTED || client_state == CLIENT_LINKDEAD); }
|
||||||
inline void Kick() { client_state = CLIENT_KICKED; }
|
|
||||||
inline void Disconnect() { eqs->Close(); client_state = DISCONNECTED; }
|
inline void Disconnect() { eqs->Close(); client_state = DISCONNECTED; }
|
||||||
inline bool IsLD() const { return (bool) (client_state == CLIENT_LINKDEAD); }
|
inline bool IsLD() const { return (bool) (client_state == CLIENT_LINKDEAD); }
|
||||||
|
void Kick(const std::string &reason);
|
||||||
void WorldKick();
|
void WorldKick();
|
||||||
inline uint8 GetAnon() const { return m_pp.anon; }
|
inline uint8 GetAnon() const { return m_pp.anon; }
|
||||||
inline PlayerProfile_Struct& GetPP() { return m_pp; }
|
inline PlayerProfile_Struct& GetPP() { return m_pp; }
|
||||||
|
|||||||
@ -1172,10 +1172,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
|||||||
Log(Logs::General, Logs::Client_Login, "%s failed zone auth check.", cze->char_name);
|
Log(Logs::General, Logs::Client_Login, "%s failed zone auth check.", cze->char_name);
|
||||||
if (nullptr != client) {
|
if (nullptr != client) {
|
||||||
client->Save();
|
client->Save();
|
||||||
client->Kick();
|
client->Kick("Failed auth check");
|
||||||
}
|
}
|
||||||
//ret = false; // TODO: Can we tell the client to get lost in a good way
|
|
||||||
client_state = CLIENT_KICKED;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9803,7 +9801,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
|
|||||||
casting_spell_id);
|
casting_spell_id);
|
||||||
database.SetMQDetectionFlag(AccountName(), GetName(), detect, zone->GetShortName());
|
database.SetMQDetectionFlag(AccountName(), GetName(), detect, zone->GetShortName());
|
||||||
safe_delete_array(detect);
|
safe_delete_array(detect);
|
||||||
Kick(); // Kick client to prevent client and server from getting out-of-sync inventory slots
|
Kick("Inventory desync"); // Kick client to prevent client and server from getting out-of-sync inventory slots
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9847,7 +9845,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
void Client::Handle_OP_MoveMultipleItems(const EQApplicationPacket *app)
|
void Client::Handle_OP_MoveMultipleItems(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
Kick(); // TODO: lets not desync though
|
Kick("Unimplemented move multiple items"); // TODO: lets not desync though
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::Handle_OP_OpenContainer(const EQApplicationPacket *app)
|
void Client::Handle_OP_OpenContainer(const EQApplicationPacket *app)
|
||||||
|
|||||||
@ -1912,7 +1912,7 @@ void command_permaclass(Client *c, const Seperator *sep)
|
|||||||
Log(Logs::General, Logs::Normal, "Class change request from %s for %s, requested class:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
Log(Logs::General, Logs::Normal, "Class change request from %s for %s, requested class:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||||
t->SetBaseClass(atoi(sep->arg[1]));
|
t->SetBaseClass(atoi(sep->arg[1]));
|
||||||
t->Save();
|
t->Save();
|
||||||
t->Kick();
|
t->Kick("Class was changed.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3895,7 +3895,7 @@ void command_kick(Client *c, const Seperator *sep)
|
|||||||
client->Message(0, "You have been kicked by %s", c->GetName());
|
client->Message(0, "You have been kicked by %s", c->GetName());
|
||||||
auto outapp = new EQApplicationPacket(OP_GMKick, 0);
|
auto outapp = new EQApplicationPacket(OP_GMKick, 0);
|
||||||
client->QueuePacket(outapp);
|
client->QueuePacket(outapp);
|
||||||
client->Kick();
|
client->Kick("Ordered kicked by command");
|
||||||
c->Message(0, "Kick: local: kicking %s", sep->arg[1]);
|
c->Message(0, "Kick: local: kicking %s", sep->arg[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5187,7 +5187,7 @@ void command_name(Client *c, const Seperator *sep)
|
|||||||
c->Message(0, "Successfully renamed %s to %s", oldname, sep->arg[1]);
|
c->Message(0, "Successfully renamed %s to %s", oldname, sep->arg[1]);
|
||||||
// until we get the name packet working right this will work
|
// until we get the name packet working right this will work
|
||||||
c->Message(0, "Sending player to char select.");
|
c->Message(0, "Sending player to char select.");
|
||||||
target->Kick();
|
target->Kick("Name was changed");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
c->Message(13, "ERROR: Unable to rename %s. Check that the new name '%s' isn't already taken.", oldname, sep->arg[2]);
|
c->Message(13, "ERROR: Unable to rename %s. Check that the new name '%s' isn't already taken.", oldname, sep->arg[2]);
|
||||||
|
|||||||
@ -1608,7 +1608,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
|||||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||||
safe_delete_array(hacked_string);
|
safe_delete_array(hacked_string);
|
||||||
Kick(); // Kicking player to avoid item loss do to client and server inventories not being sync'd
|
Kick("Inventory desync"); // Kicking player to avoid item loss do to client and server inventories not being sync'd
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1822,7 +1822,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
|||||||
// Step 4: Check for entity trade
|
// Step 4: Check for entity trade
|
||||||
if (dst_slot_id >= EQEmu::invslot::TRADE_BEGIN && dst_slot_id <= EQEmu::invslot::TRADE_END) {
|
if (dst_slot_id >= EQEmu::invslot::TRADE_BEGIN && dst_slot_id <= EQEmu::invslot::TRADE_END) {
|
||||||
if (src_slot_id != EQEmu::invslot::slotCursor) {
|
if (src_slot_id != EQEmu::invslot::slotCursor) {
|
||||||
Kick();
|
Kick("Trade with non-cursor item");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (with) {
|
if (with) {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ bool Lua_Client::InZone() {
|
|||||||
|
|
||||||
void Lua_Client::Kick() {
|
void Lua_Client::Kick() {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->Kick();
|
self->Kick("Lua Quest");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::Disconnect() {
|
void Lua_Client::Disconnect() {
|
||||||
|
|||||||
@ -174,7 +174,7 @@ XS(XS_Client_Kick) {
|
|||||||
if (THIS == nullptr)
|
if (THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
THIS->Kick();
|
THIS->Kick("Perl Quest");
|
||||||
}
|
}
|
||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -809,7 +809,7 @@ void QuestManager::changedeity(int diety_id) {
|
|||||||
initiator->SetDeity(diety_id);
|
initiator->SetDeity(diety_id);
|
||||||
initiator->Message(15,"Your Deity has been changed/set to: %i", diety_id);
|
initiator->Message(15,"Your Deity has been changed/set to: %i", diety_id);
|
||||||
initiator->Save(1);
|
initiator->Save(1);
|
||||||
initiator->Kick();
|
initiator->Kick("Deity change by QuestManager");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -943,7 +943,7 @@ void QuestManager::permaclass(int class_id) {
|
|||||||
//Makes the client the class specified
|
//Makes the client the class specified
|
||||||
initiator->SetBaseClass(class_id);
|
initiator->SetBaseClass(class_id);
|
||||||
initiator->Save(2);
|
initiator->Save(2);
|
||||||
initiator->Kick();
|
initiator->Kick("Base class change by QuestManager");
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuestManager::permarace(int race_id) {
|
void QuestManager::permarace(int race_id) {
|
||||||
@ -951,7 +951,7 @@ void QuestManager::permarace(int race_id) {
|
|||||||
//Makes the client the race specified
|
//Makes the client the race specified
|
||||||
initiator->SetBaseRace(race_id);
|
initiator->SetBaseRace(race_id);
|
||||||
initiator->Save(2);
|
initiator->Save(2);
|
||||||
initiator->Kick();
|
initiator->Kick("Base race change by QuestManager");
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuestManager::permagender(int gender_id) {
|
void QuestManager::permagender(int gender_id) {
|
||||||
@ -959,7 +959,7 @@ void QuestManager::permagender(int gender_id) {
|
|||||||
//Makes the client the gender specified
|
//Makes the client the gender specified
|
||||||
initiator->SetBaseGender(gender_id);
|
initiator->SetBaseGender(gender_id);
|
||||||
initiator->Save(2);
|
initiator->Save(2);
|
||||||
initiator->Kick();
|
initiator->Kick("Base gender change by QuestManager");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) {
|
uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) {
|
||||||
|
|||||||
@ -112,7 +112,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
|
|||||||
// (it just didn't handle partial stack move actions)
|
// (it just didn't handle partial stack move actions)
|
||||||
if (stack_size > 0) {
|
if (stack_size > 0) {
|
||||||
if (!inst->IsStackable() || !inst2 || !inst2->GetItem() || (inst->GetID() != inst2->GetID()) || (stack_size > inst->GetCharges())) {
|
if (!inst->IsStackable() || !inst2 || !inst2->GetItem() || (inst->GetID() != inst2->GetID()) || (stack_size > inst->GetCharges())) {
|
||||||
client->Kick();
|
client->Kick("Error stacking item in trade");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (inst2 && inst2->GetID()) {
|
if (inst2 && inst2->GetID()) {
|
||||||
client->Kick();
|
client->Kick("Attempting to add null item to trade");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -536,6 +536,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
SetZoneData(zone->GetZoneID(), zone->GetInstanceID());
|
SetZoneData(zone->GetZoneID(), zone->GetInstanceID());
|
||||||
|
|
||||||
if (szic->zoneid == zone->GetZoneID()) {
|
if (szic->zoneid == zone->GetZoneID()) {
|
||||||
|
auto client = entity_list.GetClientByLSID(szic->lsid);
|
||||||
|
if (client) {
|
||||||
|
client->Kick("Dropped by world CLE subsystem");
|
||||||
|
client->Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
zone->RemoveAuth(szic->lsid);
|
||||||
zone->AddAuth(szic);
|
zone->AddAuth(szic);
|
||||||
// This packet also doubles as "incoming client" notification, lets not shut down before they get here
|
// This packet also doubles as "incoming client" notification, lets not shut down before they get here
|
||||||
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
||||||
@ -559,7 +566,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
|
|
||||||
auto client = entity_list.GetClientByLSID(drop->lsid);
|
auto client = entity_list.GetClientByLSID(drop->lsid);
|
||||||
if (client) {
|
if (client) {
|
||||||
client->Kick();
|
client->Kick("Dropped by world CLE subsystem");
|
||||||
client->Save();
|
client->Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user