Merge fixes, hopefully didn't break anything.

This commit is contained in:
KimLS
2015-01-23 13:36:27 -08:00
259 changed files with 4107 additions and 6086 deletions
+16 -14
View File
@@ -18,7 +18,9 @@
client_process.cpp:
Handles client login sequence and packets sent from client to zone
*/
#include "../common/debug.h"
#include "../common/eqemu_logsys.h"
#include "../common/global_define.h"
#include <iostream>
#include <stdio.h>
#include <zlib.h>
@@ -656,7 +658,7 @@ bool Client::Process() {
if (client_state != CLIENT_LINKDEAD && !eqs->CheckState(ESTABLISHED)) {
OnDisconnect(true);
std::cout << "Client linkdead: " << name << std::endl;
Log.Out(Logs::General, Logs::Zone_Server, "Client linkdead: %s", name);
if (GetGM()) {
if (GetMerc())
@@ -785,7 +787,7 @@ void Client::OnDisconnect(bool hard_disconnect) {
Mob *Other = trade->With();
if(Other)
{
mlog(TRADING__CLIENT, "Client disconnected during a trade. Returning their items.");
Log.Out(Logs::Detail, Logs::Trading, "Client disconnected during a trade. Returning their items.");
FinishTrade(this);
if(Other->IsClient())
@@ -822,7 +824,7 @@ void Client::BulkSendInventoryItems() {
if(inst) {
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
mlog(INVENTORY__ERROR, "Incomplete Trade Transaction: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
Log.Out(Logs::Detail, Logs::Inventory, "Incomplete Trade Transaction: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
PutItemInInventory(free_slot_id, *inst, false);
database.SaveInventory(character_id, nullptr, slot_id);
safe_delete(inst);
@@ -1023,7 +1025,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
// Account for merchant lists with gaps.
if (ml.slot >= i) {
if (ml.slot > i)
LogFile->write(EQEmuLog::Debug, "(WARNING) Merchantlist contains gap at slot %d. Merchant: %d, NPC: %d", i, merchant_id, npcid);
Log.Out(Logs::General, Logs::None, "(WARNING) Merchantlist contains gap at slot %d. Merchant: %d, NPC: %d", i, merchant_id, npcid);
i = ml.slot + 1;
}
}
@@ -1115,7 +1117,7 @@ uint8 Client::WithCustomer(uint16 NewCustomer){
Client* c = entity_list.GetClientByID(CustomerID);
if(!c) {
_log(TRADING__CLIENT, "Previous customer has gone away.");
Log.Out(Logs::Detail, Logs::Trading, "Previous customer has gone away.");
CustomerID = NewCustomer;
return 1;
}
@@ -1127,7 +1129,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
{
if(PendingRezzXP < 0) {
// pendingrezexp is set to -1 if we are not expecting an OP_RezzAnswer
_log(SPELLS__REZ, "Unexpected OP_RezzAnswer. Ignoring it.");
Log.Out(Logs::Detail, Logs::Spells, "Unexpected OP_RezzAnswer. Ignoring it.");
Message(13, "You have already been resurrected.\n");
return;
}
@@ -1137,7 +1139,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
// Mark the corpse as rezzed in the database, just in case the corpse has buried, or the zone the
// corpse is in has shutdown since the rez spell was cast.
database.MarkCorpseAsRezzed(PendingRezzDBID);
_log(SPELLS__REZ, "Player %s got a %i Rezz, spellid %i in zone%i, instance id %i",
Log.Out(Logs::Detail, Logs::Spells, "Player %s got a %i Rezz, spellid %i in zone%i, instance id %i",
this->name, (uint16)spells[SpellID].base[0],
SpellID, ZoneID, InstanceID);
@@ -1187,7 +1189,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
{
if(app->size != sizeof(MemorizeSpell_Struct))
{
LogFile->write(EQEmuLog::Error,"Wrong size on OP_MemorizeSpell. Got: %i, Expected: %i", app->size, sizeof(MemorizeSpell_Struct));
Log.Out(Logs::General, Logs::Error, "Wrong size on OP_MemorizeSpell. Got: %i, Expected: %i", app->size, sizeof(MemorizeSpell_Struct));
DumpPacket(app);
return;
}
@@ -1709,12 +1711,12 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
SkillUseTypes skill = (SkillUseTypes) gmskill->skill_id;
if(!CanHaveSkill(skill)) {
mlog(CLIENT__ERROR, "Tried to train skill %d, which is not allowed.", skill);
Log.Out(Logs::Detail, Logs::Skills, "Tried to train skill %d, which is not allowed.", skill);
return;
}
if(MaxSkill(skill) == 0) {
mlog(CLIENT__ERROR, "Tried to train skill %d, but training is not allowed at this level.", skill);
Log.Out(Logs::Detail, Logs::Skills, "Tried to train skill %d, but training is not allowed at this level.", skill);
return;
}
@@ -2108,7 +2110,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
{
if (PendingRezzXP < 0 || PendingRezzSpellID == 0)
{
_log(SPELLS__REZ, "Unexpected Rezz from hover request.");
Log.Out(Logs::Detail, Logs::Spells, "Unexpected Rezz from hover request.");
return;
}
SetHP(GetMaxHP() / 5);
@@ -2141,10 +2143,10 @@ void Client::HandleRespawnFromHover(uint32 Option)
if (corpse && corpse->IsCorpse())
{
_log(SPELLS__REZ, "Hover Rez in zone %s for corpse %s",
Log.Out(Logs::Detail, Logs::Spells, "Hover Rez in zone %s for corpse %s",
zone->GetShortName(), PendingRezzCorpseName.c_str());
_log(SPELLS__REZ, "Found corpse. Marking corpse as rezzed.");
Log.Out(Logs::Detail, Logs::Spells, "Found corpse. Marking corpse as rezzed.");
corpse->IsRezzed(true);
corpse->CompleteResurrection();