mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Rename LogDebugType to DebugCategory
This commit is contained in:
+7
-7
@@ -342,17 +342,17 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
||||
{
|
||||
//FatherNiwtit: make sure we can see them. last since it is very expensive
|
||||
if(CheckLosFN(mob)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Check aggro for %s target %s.", GetName(), mob->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Check aggro for %s target %s.", GetName(), mob->GetName());
|
||||
return( mod_will_aggro(mob, this) );
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Is In zone?:%d\n", mob->InZone());
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Dist^2: %f\n", dist2);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Range^2: %f\n", iAggroRange2);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Faction: %d\n", fv);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Int: %d\n", GetINT());
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Con: %d\n", GetLevelCon(mob->GetLevel()));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Is In zone?:%d\n", mob->InZone());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Dist^2: %f\n", dist2);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Range^2: %f\n", iAggroRange2);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Faction: %d\n", fv);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Int: %d\n", GetINT());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Con: %d\n", GetLevelCon(mob->GetLevel()));
|
||||
|
||||
return(false);
|
||||
}
|
||||
|
||||
+13
-13
@@ -57,7 +57,7 @@ bool Mob::AttackAnimation(SkillUseTypes &skillinuse, int Hand, const ItemInst* w
|
||||
if (weapon && weapon->IsType(ItemClassCommon)) {
|
||||
const Item_Struct* item = weapon->GetItem();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Weapon skill : %i", item->ItemType);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Weapon skill : %i", item->ItemType);
|
||||
|
||||
switch (item->ItemType)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
||||
if(attacker->IsNPC() && !attacker->IsPet())
|
||||
chancetohit += RuleR(Combat, NPCBonusHitChance);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "CheckHitChance(%s) attacked by %s", defender->GetName(), attacker->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "CheckHitChance(%s) attacked by %s", defender->GetName(), attacker->GetName());
|
||||
|
||||
bool pvpmode = false;
|
||||
if(IsClient() && other->IsClient())
|
||||
@@ -208,7 +208,7 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
||||
|
||||
//Calculate the level difference
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit before level diff calc %.2f", chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit before level diff calc %.2f", chancetohit);
|
||||
|
||||
double level_difference = attacker_level - defender_level;
|
||||
double range = defender->GetLevel();
|
||||
@@ -236,32 +236,32 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
||||
chancetohit += (RuleR(Combat,HitBonusPerLevel) * level_difference);
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after level diff calc %.2f", chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after level diff calc %.2f", chancetohit);
|
||||
|
||||
chancetohit -= ((float)defender->GetAGI() * RuleR(Combat, AgiHitFactor));
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after Agility calc %.2f", chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after Agility calc %.2f", chancetohit);
|
||||
|
||||
if(attacker->IsClient())
|
||||
{
|
||||
chancetohit -= (RuleR(Combat,WeaponSkillFalloff) * (attacker->CastToClient()->MaxSkill(skillinuse) - attacker->GetSkill(skillinuse)));
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after agil calc %.2f", "Chance to hit after weapon falloff calc (attack) %.2f", chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after agil calc %.2f", "Chance to hit after weapon falloff calc (attack) %.2f", chancetohit);
|
||||
}
|
||||
|
||||
if(defender->IsClient())
|
||||
{
|
||||
chancetohit += (RuleR(Combat,WeaponSkillFalloff) * (defender->CastToClient()->MaxSkill(SkillDefense) - defender->GetSkill(SkillDefense)));
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after weapon falloff calc (defense) %.2f", chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after weapon falloff calc (defense) %.2f", chancetohit);
|
||||
}
|
||||
|
||||
//I dont think this is 100% correct, but at least it does something...
|
||||
if(attacker->spellbonuses.MeleeSkillCheckSkill == skillinuse || attacker->spellbonuses.MeleeSkillCheckSkill == 255) {
|
||||
chancetohit += attacker->spellbonuses.MeleeSkillCheck;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Applied spell melee skill bonus %d, yeilding %.2f", attacker->spellbonuses.MeleeSkillCheck, chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Applied spell melee skill bonus %d, yeilding %.2f", attacker->spellbonuses.MeleeSkillCheck, chancetohit);
|
||||
}
|
||||
if(attacker->itembonuses.MeleeSkillCheckSkill == skillinuse || attacker->itembonuses.MeleeSkillCheckSkill == 255) {
|
||||
chancetohit += attacker->itembonuses.MeleeSkillCheck;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Applied item melee skill bonus %d, yeilding %.2f", attacker->spellbonuses.MeleeSkillCheck, chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Applied item melee skill bonus %d, yeilding %.2f", attacker->spellbonuses.MeleeSkillCheck, chancetohit);
|
||||
}
|
||||
|
||||
//Avoidance Bonuses on defender decreases baseline hit chance by percent.
|
||||
@@ -308,7 +308,7 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
||||
|
||||
//Calculate final chance to hit
|
||||
chancetohit += ((chancetohit * (hitBonus - avoidanceBonus)) / 100.0f);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit %.2f after accuracy calc %.2f and avoidance calc %.2f", chancetohit, hitBonus, avoidanceBonus);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit %.2f after accuracy calc %.2f and avoidance calc %.2f", chancetohit, hitBonus, avoidanceBonus);
|
||||
|
||||
chancetohit = mod_hit_chance(chancetohit, skillinuse, attacker);
|
||||
|
||||
@@ -327,7 +327,7 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
||||
//agains a garunteed riposte (for example) discipline... for now, garunteed hit wins
|
||||
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "3 FINAL calculated chance to hit is: %5.2f", chancetohit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "3 FINAL calculated chance to hit is: %5.2f", chancetohit);
|
||||
|
||||
|
||||
//
|
||||
@@ -336,7 +336,7 @@ bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 c
|
||||
|
||||
float tohit_roll = zone->random.Real(0, 100);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll);
|
||||
|
||||
return(tohit_roll <= chancetohit);
|
||||
}
|
||||
@@ -2028,7 +2028,7 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack
|
||||
if (IsEngaged())
|
||||
{
|
||||
zone->DelAggroMob();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "%s Mobs currently Aggro %i", __FUNCTION__, zone->MobsAggroCount());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "%s Mobs currently Aggro %i", __FUNCTION__, zone->MobsAggroCount());
|
||||
}
|
||||
SetHP(0);
|
||||
SetPet(0);
|
||||
|
||||
+3
-3
@@ -77,9 +77,9 @@ void Client::CalcBonuses()
|
||||
|
||||
CalcSpellBonuses(&spellbonuses);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
CalcAABonuses(&aabonuses); //we're not quite ready for this
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Finished calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Finished calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
|
||||
RecalcWeight();
|
||||
|
||||
@@ -634,7 +634,7 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||
if (effect == SE_Blank || (effect == SE_CHA && base1 == 0) || effect == SE_StackingCommand_Block || effect == SE_StackingCommand_Overwrite)
|
||||
continue;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Applying Effect %d from AA %u in slot %d (base1: %d, base2: %d) on %s", effect, aaid, slot, base1, base2, this->GetCleanName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Applying Effect %d from AA %u in slot %d (base1: %d, base2: %d) on %s", effect, aaid, slot, base1, base2, this->GetCleanName());
|
||||
|
||||
uint8 focus = IsFocusEffect(0, 0, true,effect);
|
||||
if (focus)
|
||||
|
||||
+2
-2
@@ -1564,7 +1564,7 @@ void Bot::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||
if (effect == SE_Blank || (effect == SE_CHA && base1 == 0) || effect == SE_StackingCommand_Block || effect == SE_StackingCommand_Overwrite)
|
||||
continue;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Applying Effect %d from AA %u in slot %d (base1: %d, base2: %d) on %s", effect, aaid, slot, base1, base2, this->GetCleanName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Applying Effect %d from AA %u in slot %d (base1: %d, base2: %d) on %s", effect, aaid, slot, base1, base2, this->GetCleanName());
|
||||
|
||||
uint8 focus = IsFocusEffect(0, 0, true,effect);
|
||||
if (focus)
|
||||
@@ -7335,7 +7335,7 @@ int32 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spel
|
||||
//this spits up a lot of garbage when calculating spell focuses
|
||||
//since they have all kinds of extra effects on them.
|
||||
default:
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Spells, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Spells, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
}
|
||||
}
|
||||
//Check for spell skill limits.
|
||||
|
||||
+8
-8
@@ -650,7 +650,7 @@ bool Client::SendAllPackets() {
|
||||
if(eqs)
|
||||
eqs->FastQueuePacket((EQApplicationPacket **)&cp->app, cp->ack_req);
|
||||
iterator.RemoveCurrent();
|
||||
logger.LogDebugType(EQEmuLogSys::Moderate, EQEmuLogSys::Client_Server_Packet, "Transmitting a packet");
|
||||
logger.DebugCategory(EQEmuLogSys::Moderate, EQEmuLogSys::Client_Server_Packet, "Transmitting a packet");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -698,7 +698,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
char message[4096];
|
||||
strn0cpy(message, orig_message, sizeof(message));
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
|
||||
|
||||
if (targetname == nullptr) {
|
||||
targetname = (!GetTarget()) ? "" : GetTarget()->GetName();
|
||||
@@ -1506,7 +1506,7 @@ void Client::UpdateAdmin(bool iFromDB) {
|
||||
|
||||
if(m_pp.gm)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Moderate, EQEmuLogSys::Zone_Server, __FUNCTION__ " - %s is a GM", GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Moderate, EQEmuLogSys::Zone_Server, __FUNCTION__ " - %s is a GM", GetName());
|
||||
// no need for this, having it set in pp you already start as gm
|
||||
// and it's also set in your spawn packet so other people see it too
|
||||
// SendAppearancePacket(AT_GM, 1, false);
|
||||
@@ -2235,13 +2235,13 @@ bool Client::CheckIncreaseSkill(SkillUseTypes skillid, Mob *against_who, int cha
|
||||
if(zone->random.Real(0, 99) < Chance)
|
||||
{
|
||||
SetSkill(skillid, GetRawSkill(skillid) + 1);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d successfully gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d successfully gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
return true;
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d failed to gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d failed to gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
}
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d cannot increase due to maxmum %d", skillid, skillval, maxskill);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d cannot increase due to maxmum %d", skillid, skillval, maxskill);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2262,10 +2262,10 @@ void Client::CheckLanguageSkillIncrease(uint8 langid, uint8 TeacherSkill) {
|
||||
|
||||
if(zone->random.Real(0,100) < Chance) { // if they make the roll
|
||||
IncreaseLanguageSkill(langid); // increase the language skill by 1
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d successfully gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d successfully gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
}
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d failed to gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d failed to gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1896,7 +1896,7 @@ uint32 Mob::GetInstrumentMod(uint16 spell_id) const
|
||||
if (effectmod > effectmodcap)
|
||||
effectmod = effectmodcap;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n",
|
||||
GetName(), spell_id, effectmod, effectmodcap);
|
||||
|
||||
return effectmod;
|
||||
|
||||
+22
-22
@@ -3573,7 +3573,7 @@ void Client::Handle_OP_Barter(const EQApplicationPacket *app)
|
||||
|
||||
default:
|
||||
Message(13, "Unrecognised Barter action.");
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unrecognised Barter Action %i", Action);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unrecognised Barter Action %i", Action);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3636,7 +3636,7 @@ void Client::Handle_OP_BazaarSearch(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Malformed BazaarSearch_Struct packe, Action %it received, ignoring...");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Malformed BazaarSearch_Struct packe, Action %it received, ignoring...");
|
||||
logger.Log(EQEmuLogSys::Error, "Malformed BazaarSearch_Struct packet received, ignoring...\n");
|
||||
}
|
||||
|
||||
@@ -7196,7 +7196,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
||||
|
||||
uint32 NewGuildID = guild_mgr.CreateGuild(GuildName, CharacterID());
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d via UF+ GUI. It was given id %lu.", GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d via UF+ GUI. It was given id %lu.", GetName(),
|
||||
GuildName, CharacterID(), (unsigned long)NewGuildID);
|
||||
|
||||
if (NewGuildID == GUILD_NONE)
|
||||
@@ -9814,7 +9814,7 @@ void Client::Handle_OP_OpenContainer(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_OpenGuildTributeMaster(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_OpenGuildTributeMaster of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_OpenGuildTributeMaster of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
if (app->size != sizeof(StartTribute_Struct))
|
||||
@@ -9846,7 +9846,7 @@ void Client::Handle_OP_OpenInventory(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_OpenTributeMaster of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_OpenTributeMaster of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
if (app->size != sizeof(StartTribute_Struct))
|
||||
@@ -11714,7 +11714,7 @@ void Client::Handle_OP_RezzAnswer(const EQApplicationPacket *app)
|
||||
|
||||
const Resurrect_Struct* ra = (const Resurrect_Struct*)app->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Received OP_RezzAnswer from client. Pendingrezzexp is %i, action is %s",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Received OP_RezzAnswer from client. Pendingrezzexp is %i, action is %s",
|
||||
PendingRezzXP, ra->action ? "ACCEPT" : "DECLINE");
|
||||
|
||||
_pkt(SPELLS__REZ, app);
|
||||
@@ -11782,7 +11782,7 @@ void Client::Handle_OP_SaveOnZoneReq(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_SelectTribute(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_SelectTribute of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_SelectTribute of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
//we should enforce being near a real tribute master to change this
|
||||
@@ -13435,7 +13435,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
|
||||
if (c)
|
||||
c->WithCustomer(0);
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderBuy: Null Client Pointer");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderBuy: Null Client Pointer");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -13444,7 +13444,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unhandled action code in OP_Trader ShowItems_Struct");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unhandled action code in OP_Trader ShowItems_Struct");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -13530,7 +13530,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_Trader: Unknown TraderStruct code of: %i\n",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_Trader: Unknown TraderStruct code of: %i\n",
|
||||
ints->Code);
|
||||
|
||||
logger.Log(EQEmuLogSys::Error, "Unknown TraderStruct code of: %i\n", ints->Code);
|
||||
@@ -13542,7 +13542,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
|
||||
HandleTraderPriceUpdate(app);
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unknown size for OP_Trader: %i\n", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unknown size for OP_Trader: %i\n", app->size);
|
||||
logger.Log(EQEmuLogSys::Error, "Unknown size for OP_Trader: %i\n", app->size);
|
||||
DumpPacket(app);
|
||||
return;
|
||||
@@ -13568,11 +13568,11 @@ void Client::Handle_OP_TraderBuy(const EQApplicationPacket *app)
|
||||
BuyTraderItem(tbs, Trader, app);
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderBuy: Null Client Pointer");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderBuy: Null Client Pointer");
|
||||
}
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderBuy: Struct size mismatch");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderBuy: Struct size mismatch");
|
||||
|
||||
}
|
||||
return;
|
||||
@@ -13646,7 +13646,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app)
|
||||
|
||||
if (app->size != sizeof(TraderClick_Struct)) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderShop: Returning due to struct size mismatch");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderShop: Returning due to struct size mismatch");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -13660,7 +13660,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app)
|
||||
if (Customer)
|
||||
outtcs->Approval = Customer->WithCustomer(GetID());
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderShop: entity_list.GetClientByID(tcs->traderid)"
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_TraderShop: entity_list.GetClientByID(tcs->traderid)"
|
||||
" returned a nullptr pointer");
|
||||
return;
|
||||
}
|
||||
@@ -13757,7 +13757,7 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_TributeItem(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeItem of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeItem of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
//player donates an item...
|
||||
@@ -13776,7 +13776,7 @@ void Client::Handle_OP_TributeItem(const EQApplicationPacket *app)
|
||||
|
||||
t->tribute_points = TributeItem(t->slot, t->quantity);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Sending tribute item reply with %d points", t->tribute_points);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Sending tribute item reply with %d points", t->tribute_points);
|
||||
_pkt(TRIBUTE__OUT, app);
|
||||
|
||||
QueuePacket(app);
|
||||
@@ -13786,7 +13786,7 @@ void Client::Handle_OP_TributeItem(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_TributeMoney(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeMoney of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeMoney of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
//player donates money
|
||||
@@ -13805,7 +13805,7 @@ void Client::Handle_OP_TributeMoney(const EQApplicationPacket *app)
|
||||
|
||||
t->tribute_points = TributeMoney(t->platinum);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Sending tribute money reply with %d points", t->tribute_points);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Sending tribute money reply with %d points", t->tribute_points);
|
||||
_pkt(TRIBUTE__OUT, app);
|
||||
|
||||
QueuePacket(app);
|
||||
@@ -13815,7 +13815,7 @@ void Client::Handle_OP_TributeMoney(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_TributeNPC(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeNPC of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeNPC of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
return;
|
||||
@@ -13823,7 +13823,7 @@ void Client::Handle_OP_TributeNPC(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_TributeToggle(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeToggle of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeToggle of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
if (app->size != sizeof(uint32))
|
||||
@@ -13837,7 +13837,7 @@ void Client::Handle_OP_TributeToggle(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_TributeUpdate(const EQApplicationPacket *app)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeUpdate of length %d", app->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tribute, "Received OP_TributeUpdate of length %d", app->size);
|
||||
_pkt(TRIBUTE__IN, app);
|
||||
|
||||
//sent when the client changes their tribute settings...
|
||||
|
||||
@@ -1129,7 +1129,7 @@ uint8 Client::WithCustomer(uint16 NewCustomer){
|
||||
Client* c = entity_list.GetClientByID(CustomerID);
|
||||
|
||||
if(!c) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Previous customer has gone away.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Previous customer has gone away.");
|
||||
CustomerID = NewCustomer;
|
||||
return 1;
|
||||
}
|
||||
@@ -1141,7 +1141,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
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Unexpected OP_RezzAnswer. Ignoring it.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Unexpected OP_RezzAnswer. Ignoring it.");
|
||||
Message(13, "You have already been resurrected.\n");
|
||||
return;
|
||||
}
|
||||
@@ -1151,7 +1151,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);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Player %s got a %i Rezz, spellid %i in zone%i, instance id %i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::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);
|
||||
|
||||
@@ -2122,7 +2122,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
{
|
||||
if (PendingRezzXP < 0 || PendingRezzSpellID == 0)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Unexpected Rezz from hover request.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Unexpected Rezz from hover request.");
|
||||
return;
|
||||
}
|
||||
SetHP(GetMaxHP() / 5);
|
||||
@@ -2155,10 +2155,10 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
|
||||
if (corpse && corpse->IsCorpse())
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Hover Rez in zone %s for corpse %s",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Hover Rez in zone %s for corpse %s",
|
||||
zone->GetShortName(), PendingRezzCorpseName.c_str());
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
|
||||
corpse->IsRezzed(true);
|
||||
corpse->CompleteResurrection();
|
||||
|
||||
+7
-7
@@ -4546,10 +4546,10 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if(guild_id == GUILD_NONE) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Removing %s (%d) from guild with GM command.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Removing %s (%d) from guild with GM command.", c->GetName(),
|
||||
sep->arg[2], charid);
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Putting %s (%d) into guild %s (%d) with GM command.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Putting %s (%d) into guild %s (%d) with GM command.", c->GetName(),
|
||||
sep->arg[2], charid,
|
||||
guild_mgr.GetGuildName(guild_id), guild_id);
|
||||
}
|
||||
@@ -4598,7 +4598,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting %s (%d)'s guild rank to %d with GM command.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting %s (%d)'s guild rank to %d with GM command.", c->GetName(),
|
||||
sep->arg[2], charid, rank);
|
||||
|
||||
if(!guild_mgr.SetGuildRank(charid, rank))
|
||||
@@ -4640,7 +4640,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
|
||||
uint32 id = guild_mgr.CreateGuild(sep->argplus[3], leader);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d with GM command. It was given id %lu.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d with GM command. It was given id %lu.", c->GetName(),
|
||||
sep->argplus[3], leader, (unsigned long)id);
|
||||
|
||||
if (id == GUILD_NONE)
|
||||
@@ -4679,7 +4679,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id);
|
||||
|
||||
if (!guild_mgr.DeleteGuild(id))
|
||||
@@ -4713,7 +4713,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Renaming guild %s (%d) to '%s' with GM command.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Renaming guild %s (%d) to '%s' with GM command.", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id, sep->argplus[3]);
|
||||
|
||||
if (!guild_mgr.RenameGuild(id, sep->argplus[3]))
|
||||
@@ -4764,7 +4764,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting leader of guild %s (%d) to %d with GM command.", c->GetName(),
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting leader of guild %s (%d) to %d with GM command.", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id, leader);
|
||||
|
||||
if(!guild_mgr.SetGuildLeader(id, leader))
|
||||
|
||||
+3
-3
@@ -145,9 +145,9 @@ bool Doors::Process()
|
||||
void Doors::HandleClick(Client* sender, uint8 trigger)
|
||||
{
|
||||
//door debugging info dump
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Doors, "%s clicked door %s (dbid %d, eqid %d) at (%.4f,%.4f,%.4f @%.4f)", sender->GetName(), door_name, db_id, door_id, pos_x, pos_y, pos_z, heading);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Doors, " incline %d, opentype %d, lockpick %d, key %d, nokeyring %d, trigger %d type %d, param %d", incline, opentype, lockpick, keyitem, nokeyring, trigger_door, trigger_type, door_param);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Doors, " size %d, invert %d, dest: %s (%.4f,%.4f,%.4f @%.4f)", size, invert_state, dest_zone, dest_x, dest_y, dest_z, dest_heading);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Doors, "%s clicked door %s (dbid %d, eqid %d) at (%.4f,%.4f,%.4f @%.4f)", sender->GetName(), door_name, db_id, door_id, pos_x, pos_y, pos_z, heading);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Doors, " incline %d, opentype %d, lockpick %d, key %d, nokeyring %d, trigger %d type %d, param %d", incline, opentype, lockpick, keyitem, nokeyring, trigger_door, trigger_type, door_param);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Doors, " size %d, invert %d, dest: %s (%.4f,%.4f,%.4f @%.4f)", size, invert_state, dest_zone, dest_x, dest_y, dest_z, dest_heading);
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
|
||||
MoveDoor_Struct* md = (MoveDoor_Struct*)outapp->pBuffer;
|
||||
|
||||
+1
-1
@@ -3397,7 +3397,7 @@ void EntityList::ReloadAllClientsTaskState(int TaskID)
|
||||
// If we have been passed a TaskID, only reload the client state if they have
|
||||
// that Task active.
|
||||
if ((!TaskID) || (TaskID && client->IsTaskActive(TaskID))) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Reloading Task State For Client %s", client->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Reloading Task State For Client %s", client->GetName());
|
||||
client->RemoveClientTaskState();
|
||||
client->LoadClientTaskState();
|
||||
taskmanager->SendActiveTasksToClient(client);
|
||||
|
||||
+2
-2
@@ -768,7 +768,7 @@ void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
|
||||
caster->SpellOnTarget(spell_id, members[z]->GetPet());
|
||||
#endif
|
||||
} else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group spell: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group spell: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,7 +807,7 @@ void Group::GroupBardPulse(Mob* caster, uint16 spell_id) {
|
||||
members[z]->GetPet()->BardPulse(spell_id, caster);
|
||||
#endif
|
||||
} else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -32,7 +32,7 @@ extern WorldServer worldserver;
|
||||
extern volatile bool ZoneLoaded;
|
||||
|
||||
void ZoneGuildManager::SendGuildRefresh(uint32 guild_id, bool name, bool motd, bool rank, bool relation) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild refresh for %d to world, changes: name=%d, motd=%d, rank=d, relation=%d", guild_id, name, motd, rank, relation);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild refresh for %d to world, changes: name=%d, motd=%d, rank=d, relation=%d", guild_id, name, motd, rank, relation);
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_RefreshGuild, sizeof(ServerGuildRefresh_Struct));
|
||||
ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer;
|
||||
s->guild_id = guild_id;
|
||||
@@ -46,7 +46,7 @@ void ZoneGuildManager::SendGuildRefresh(uint32 guild_id, bool name, bool motd, b
|
||||
|
||||
void ZoneGuildManager::SendCharRefresh(uint32 old_guild_id, uint32 guild_id, uint32 charid) {
|
||||
if(guild_id == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Guild lookup for char %d when sending char refresh.", charid);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Guild lookup for char %d when sending char refresh.", charid);
|
||||
|
||||
CharGuildInfo gci;
|
||||
if(!GetCharInfo(charid, gci)) {
|
||||
@@ -56,7 +56,7 @@ void ZoneGuildManager::SendCharRefresh(uint32 old_guild_id, uint32 guild_id, uin
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending char refresh for %d from guild %d to world", charid, guild_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending char refresh for %d from guild %d to world", charid, guild_id);
|
||||
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_GuildCharRefresh, sizeof(ServerGuildCharRefresh_Struct));
|
||||
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
|
||||
@@ -89,7 +89,7 @@ void ZoneGuildManager::SendRankUpdate(uint32 CharID)
|
||||
}
|
||||
|
||||
void ZoneGuildManager::SendGuildDelete(uint32 guild_id) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild delete for guild %d to world", guild_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild delete for guild %d to world", guild_id);
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_DeleteGuild, sizeof(ServerGuildID_Struct));
|
||||
ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer;
|
||||
s->guild_id = guild_id;
|
||||
@@ -266,7 +266,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
}
|
||||
ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild refresh from world for %d, changes: name=%d, motd=%d, rank=%d, relation=%d", s->guild_id, s->name_change, s->motd_change, s->rank_change, s->relation_change);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild refresh from world for %d, changes: name=%d, motd=%d, rank=%d, relation=%d", s->guild_id, s->name_change, s->motd_change, s->rank_change, s->relation_change);
|
||||
|
||||
//reload all the guild details from the database.
|
||||
RefreshGuild(s->guild_id);
|
||||
@@ -300,7 +300,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
}
|
||||
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild member refresh from world for char %d from guild %d", s->char_id, s->guild_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild member refresh from world for char %d from guild %d", s->char_id, s->guild_id);
|
||||
|
||||
Client *c = entity_list.GetClientByCharID(s->char_id);
|
||||
|
||||
@@ -369,7 +369,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
}
|
||||
ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild delete from world for guild %d", s->guild_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild delete from world for guild %d", s->guild_id);
|
||||
|
||||
//clear all the guild tags.
|
||||
entity_list.RefreshAllGuildInfo(s->guild_id);
|
||||
@@ -417,10 +417,10 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
|
||||
if (!c || !c->IsInAGuild())
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Invalid Client or not in guild. ID=%i", FromID);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Invalid Client or not in guild. ID=%i", FromID);
|
||||
break;
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Processing ServerOP_OnlineGuildMembersResponse");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Processing ServerOP_OnlineGuildMembersResponse");
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildMemberUpdate, sizeof(GuildMemberUpdate_Struct));
|
||||
GuildMemberUpdate_Struct *gmus = (GuildMemberUpdate_Struct*)outapp->pBuffer;
|
||||
char Name[64];
|
||||
@@ -433,7 +433,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
VARSTRUCT_DECODE_STRING(Name, Buffer);
|
||||
strn0cpy(gmus->MemberName, Name, sizeof(gmus->MemberName));
|
||||
gmus->ZoneID = VARSTRUCT_DECODE_TYPE(uint32, Buffer);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
|
||||
c->QueuePacket(outapp);
|
||||
}
|
||||
safe_delete(outapp);
|
||||
|
||||
+12
-12
@@ -2479,7 +2479,7 @@ void Client::CreateBandolier(const EQApplicationPacket *app) {
|
||||
|
||||
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->number, bs->name);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->number, bs->name);
|
||||
strcpy(m_pp.bandoliers[bs->number].name, bs->name);
|
||||
|
||||
const ItemInst* InvItem = nullptr;
|
||||
@@ -2491,13 +2491,13 @@ void Client::CreateBandolier(const EQApplicationPacket *app) {
|
||||
InvItem = GetInv()[WeaponSlot];
|
||||
if(InvItem) {
|
||||
BaseItem = InvItem->GetItem();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
||||
m_pp.bandoliers[bs->number].items[BandolierSlot].item_id = BaseItem->ID;
|
||||
m_pp.bandoliers[bs->number].items[BandolierSlot].icon = BaseItem->Icon;
|
||||
database.SaveCharacterBandolier(this->CharacterID(), bs->number, BandolierSlot, m_pp.bandoliers[bs->number].items[BandolierSlot].item_id, m_pp.bandoliers[bs->number].items[BandolierSlot].icon, bs->name);
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
||||
m_pp.bandoliers[bs->number].items[BandolierSlot].item_id = 0;
|
||||
m_pp.bandoliers[bs->number].items[BandolierSlot].icon = 0;
|
||||
}
|
||||
@@ -2506,7 +2506,7 @@ void Client::CreateBandolier(const EQApplicationPacket *app) {
|
||||
|
||||
void Client::RemoveBandolier(const EQApplicationPacket *app) {
|
||||
BandolierDelete_Struct *bds = (BandolierDelete_Struct*)app->pBuffer;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s removing set", GetName(), bds->number);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s removing set", GetName(), bds->number);
|
||||
memset(m_pp.bandoliers[bds->number].name, 0, 32);
|
||||
for(int i = bandolierMainHand; i <= bandolierAmmo; i++) {
|
||||
m_pp.bandoliers[bds->number].items[i].item_id = 0;
|
||||
@@ -2521,7 +2521,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
||||
// any items currently in the weapon slots to inventory.
|
||||
|
||||
BandolierSet_Struct *bss = (BandolierSet_Struct*)app->pBuffer;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s activating set %i", GetName(), bss->number);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s activating set %i", GetName(), bss->number);
|
||||
int16 slot;
|
||||
int16 WeaponSlot;
|
||||
ItemInst *BandolierItems[4]; // Temporary holding area for the weapons we pull out of their inventory
|
||||
@@ -2585,11 +2585,11 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
||||
else { // The player doesn't have the required weapon with them.
|
||||
BandolierItems[BandolierSlot] = 0;
|
||||
if (slot == INVALID_INDEX) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Character does not have required bandolier item for slot %i", WeaponSlot);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Character does not have required bandolier item for slot %i", WeaponSlot);
|
||||
ItemInst *InvItem = m_inv.PopItem(WeaponSlot);
|
||||
if(InvItem) {
|
||||
// If there was an item in that weapon slot, put it in the inventory
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "returning item %s in weapon slot %i to inventory",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "returning item %s in weapon slot %i to inventory",
|
||||
InvItem->GetItem()->Name, WeaponSlot);
|
||||
if(MoveItemToInventory(InvItem))
|
||||
database.SaveInventory(character_id, 0, WeaponSlot);
|
||||
@@ -2640,7 +2640,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
||||
// put it in the player's inventory.
|
||||
ItemInst *InvItem = m_inv.PopItem(WeaponSlot);
|
||||
if(InvItem) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Bandolier has no item for slot %i, returning item %s to inventory",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Bandolier has no item for slot %i, returning item %s to inventory",
|
||||
WeaponSlot, InvItem->GetItem()->Name);
|
||||
// If there was an item in that weapon slot, put it in the inventory
|
||||
if(MoveItemToInventory(InvItem))
|
||||
@@ -2677,7 +2677,7 @@ bool Client::MoveItemToInventory(ItemInst *ItemToReturn, bool UpdateClient) {
|
||||
|
||||
if(!ItemToReturn) return false;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory,"Char: %s Returning %s to inventory", GetName(), ItemToReturn->GetItem()->Name);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory,"Char: %s Returning %s to inventory", GetName(), ItemToReturn->GetItem()->Name);
|
||||
|
||||
uint32 ItemID = ItemToReturn->GetItem()->ID;
|
||||
|
||||
@@ -2761,7 +2761,7 @@ bool Client::MoveItemToInventory(ItemInst *ItemToReturn, bool UpdateClient) {
|
||||
|
||||
database.SaveInventory(character_id, m_inv.GetItem(i), i);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Storing in main inventory slot %i", GetName(), i);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Storing in main inventory slot %i", GetName(), i);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2784,7 +2784,7 @@ bool Client::MoveItemToInventory(ItemInst *ItemToReturn, bool UpdateClient) {
|
||||
|
||||
database.SaveInventory(character_id, m_inv.GetItem(BaseSlotID + BagSlot), BaseSlotID + BagSlot);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Storing in bag slot %i", GetName(), BaseSlotID + BagSlot);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Storing in bag slot %i", GetName(), BaseSlotID + BagSlot);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2794,7 +2794,7 @@ bool Client::MoveItemToInventory(ItemInst *ItemToReturn, bool UpdateClient) {
|
||||
|
||||
// Store on the cursor
|
||||
//
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s No space, putting on the cursor", GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s No space, putting on the cursor", GetName());
|
||||
|
||||
PushItemOnCursor(*ItemToReturn, UpdateClient);
|
||||
|
||||
|
||||
+36
-36
@@ -148,7 +148,7 @@ int main(int argc, char** argv) {
|
||||
worldserver.SetLauncherName("NONE");
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading server configuration..");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading server configuration..");
|
||||
if (!ZoneConfig::LoadConfig()) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading server configuration failed.");
|
||||
return 1;
|
||||
@@ -156,13 +156,13 @@ int main(int argc, char** argv) {
|
||||
const ZoneConfig *Config=ZoneConfig::get();
|
||||
|
||||
if(!load_log_settings(Config->LogSettingsFile.c_str()))
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
|
||||
worldserver.SetPassword(Config->SharedKey.c_str());
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Connecting to MySQL...");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Connecting to MySQL...");
|
||||
if (!database.Connect(
|
||||
Config->DatabaseHost.c_str(),
|
||||
Config->DatabaseUsername.c_str(),
|
||||
@@ -186,7 +186,7 @@ int main(int argc, char** argv) {
|
||||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
#endif
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
|
||||
/*
|
||||
* Setup nice signal handlers
|
||||
@@ -208,99 +208,99 @@ int main(int argc, char** argv) {
|
||||
|
||||
const char *log_ini_file = "./log.ini";
|
||||
if(!load_log_settings(log_ini_file))
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", log_ini_file);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", log_ini_file);
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", log_ini_file);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", log_ini_file);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Mapping Incoming Opcodes");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Mapping Incoming Opcodes");
|
||||
MapOpcodes();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading Variables");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading Variables");
|
||||
database.LoadVariables();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading zone names");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading zone names");
|
||||
database.LoadZoneNames();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading items");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading items");
|
||||
if (!database.LoadItems()) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading items FAILED!");
|
||||
logger.Log(EQEmuLogSys::Error, "Failed. But ignoring error and going on...");
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading npc faction lists");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading npc faction lists");
|
||||
if (!database.LoadNPCFactionLists()) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading npcs faction lists FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading loot tables");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading loot tables");
|
||||
if (!database.LoadLoot()) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading loot FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading skill caps");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading skill caps");
|
||||
if (!database.LoadSkillCaps()) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading skill caps FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading spells");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading spells");
|
||||
EQEmu::MemoryMappedFile *mmf = nullptr;
|
||||
LoadSpells(&mmf);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading base data");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading base data");
|
||||
if (!database.LoadBaseData()) {
|
||||
logger.Log(EQEmuLogSys::Error, "Loading base data FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading guilds");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading guilds");
|
||||
guild_mgr.LoadGuilds();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading factions");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading factions");
|
||||
database.LoadFactionData();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading titles");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading titles");
|
||||
title_manager.LoadTitles();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading AA effects");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading AA effects");
|
||||
database.LoadAAEffects();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading tributes");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading tributes");
|
||||
database.LoadTributes();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading corpse timers");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading corpse timers");
|
||||
database.GetDecayTimes(npcCorpseDecayTimes);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading commands");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading commands");
|
||||
int retval=command_init();
|
||||
if(retval<0)
|
||||
logger.Log(EQEmuLogSys::Error, "Command loading FAILED");
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "%d commands loaded", retval);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "%d commands loaded", retval);
|
||||
|
||||
//rules:
|
||||
{
|
||||
char tmp[64];
|
||||
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading rule set '%s'", tmp);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading rule set '%s'", tmp);
|
||||
if(!RuleManager::Instance()->LoadRules(&database, tmp)) {
|
||||
logger.Log(EQEmuLogSys::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp);
|
||||
}
|
||||
} else {
|
||||
if(!RuleManager::Instance()->LoadRules(&database, "default")) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "No rule set configured, using default rules");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "No rule set configured, using default rules");
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loaded default rule set 'default'", tmp);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loaded default rule set 'default'", tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(RuleB(TaskSystem, EnableTaskSystem)) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[INIT] Loading Tasks");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[INIT] Loading Tasks");
|
||||
taskmanager = new TaskManager;
|
||||
taskmanager->LoadTasks();
|
||||
}
|
||||
@@ -317,7 +317,7 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
//now we have our parser, load the quests
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading quests");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading quests");
|
||||
parse->ReloadQuests();
|
||||
|
||||
if (!worldserver.Connect()) {
|
||||
@@ -332,7 +332,7 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
#endif
|
||||
if (!strlen(zone_name) || !strcmp(zone_name,".")) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Entering sleep mode");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Entering sleep mode");
|
||||
} else if (!Zone::Bootup(database.GetZoneID(zone_name), 0, true)) { //todo: go above and fix this to allow cmd line instance
|
||||
logger.Log(EQEmuLogSys::Error, "Zone Bootup failed :: Zone::Bootup");
|
||||
zone = 0;
|
||||
@@ -365,7 +365,7 @@ int main(int argc, char** argv) {
|
||||
worldserver.Process();
|
||||
|
||||
if (!eqsf.IsOpen() && Config->ZonePort!=0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Starting EQ Network server on port %d",Config->ZonePort);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Starting EQ Network server on port %d",Config->ZonePort);
|
||||
|
||||
// log_sys.CloseZoneLogs();
|
||||
// log_sys.StartZoneLogs(StringFormat("%s_ver-%u_instid-%u_port-%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort));
|
||||
@@ -385,7 +385,7 @@ int main(int argc, char** argv) {
|
||||
//structures and opcodes for that patch.
|
||||
struct in_addr in;
|
||||
in.s_addr = eqss->GetRemoteIP();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "New connection from %s:%d", inet_ntoa(in),ntohs(eqss->GetRemotePort()));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "New connection from %s:%d", inet_ntoa(in),ntohs(eqss->GetRemotePort()));
|
||||
stream_identifier.AddStream(eqss); //takes the stream
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ int main(int argc, char** argv) {
|
||||
//now that we know what patch they are running, start up their client object
|
||||
struct in_addr in;
|
||||
in.s_addr = eqsi->GetRemoteIP();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "New client from %s:%d", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "New client from %s:%d", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
Client* client = new Client(eqsi);
|
||||
entity_list.AddClient(client);
|
||||
}
|
||||
@@ -522,13 +522,13 @@ int main(int argc, char** argv) {
|
||||
command_deinit();
|
||||
safe_delete(parse);
|
||||
CheckEQEMuErrorAndPause();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Proper zone shutdown complete.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Proper zone shutdown complete.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CatchSignal(int sig_num) {
|
||||
#ifdef _WINDOWS
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Recieved signal: %i", sig_num);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Recieved signal: %i", sig_num);
|
||||
#endif
|
||||
RunLoops = false;
|
||||
}
|
||||
@@ -539,7 +539,7 @@ void Shutdown()
|
||||
RunLoops = false;
|
||||
worldserver.Disconnect();
|
||||
// safe_delete(worldserver);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Shutting down...");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Shutting down...");
|
||||
}
|
||||
|
||||
uint32 NetConnection::GetIP()
|
||||
|
||||
+1
-1
@@ -2074,7 +2074,7 @@ bool QuestManager::istaskenabled(int taskid) {
|
||||
|
||||
void QuestManager::tasksetselector(int tasksetid) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for task set %i", tasksetid);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for task set %i", tasksetid);
|
||||
if(RuleB(TaskSystem, EnableTaskSystem) && initiator && owner && taskmanager)
|
||||
initiator->TaskSetSelector(owner, tasksetid);
|
||||
}
|
||||
|
||||
+2
-2
@@ -498,7 +498,7 @@ void Raid::CastGroupSpell(Mob* caster, uint16 spellid, uint32 gid)
|
||||
#endif
|
||||
}
|
||||
else{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Raid spell: %s is out of range %f at distance %f from %s", members[x].member->GetName(), range, distance, caster->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Raid spell: %s is out of range %f at distance %f from %s", members[x].member->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -799,7 +799,7 @@ void Raid::GroupBardPulse(Mob* caster, uint16 spellid, uint32 gid){
|
||||
members[z].member->GetPet()->BardPulse(spellid, caster);
|
||||
#endif
|
||||
} else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z].member->GetName(), range, distance, caster->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z].member->GetName(), range, distance, caster->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+65
-65
@@ -153,13 +153,13 @@ bool Spawn2::Process() {
|
||||
if (timer.Check()) {
|
||||
timer.Disable();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Timer has triggered", spawn2_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Timer has triggered", spawn2_id);
|
||||
|
||||
//first check our spawn condition, if this isnt active
|
||||
//then we reset the timer and try again next time.
|
||||
if(condition_id != SC_AlwaysEnabled
|
||||
&& !zone->spawn_conditions.Check(condition_id, condition_min_value)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: spawning prevented by spawn condition %d", spawn2_id, condition_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: spawning prevented by spawn condition %d", spawn2_id, condition_id);
|
||||
Reset();
|
||||
return(true);
|
||||
}
|
||||
@@ -170,14 +170,14 @@ bool Spawn2::Process() {
|
||||
}
|
||||
|
||||
if (sg == nullptr) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Unable to locate spawn group %d. Disabling.", spawn2_id, spawngroup_id_);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Unable to locate spawn group %d. Disabling.", spawn2_id, spawngroup_id_);
|
||||
return false;
|
||||
}
|
||||
|
||||
//have the spawn group pick an NPC for us
|
||||
uint32 npcid = sg->GetNPCType();
|
||||
if (npcid == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d did not yeild an NPC! not spawning.", spawn2_id, spawngroup_id_);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d did not yeild an NPC! not spawning.", spawn2_id, spawngroup_id_);
|
||||
Reset(); //try again later (why?)
|
||||
return(true);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ bool Spawn2::Process() {
|
||||
//try to find our NPC type.
|
||||
const NPCType* tmp = database.GetNPCType(npcid);
|
||||
if (tmp == nullptr) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", spawn2_id, spawngroup_id_, npcid);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", spawn2_id, spawngroup_id_, npcid);
|
||||
Reset(); //try again later
|
||||
return(true);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ bool Spawn2::Process() {
|
||||
{
|
||||
if(!entity_list.LimitCheckName(tmp->name))
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is unique and one already exists.", spawn2_id, spawngroup_id_, npcid);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is unique and one already exists.", spawn2_id, spawngroup_id_, npcid);
|
||||
timer.Start(5000); //try again in five seconds.
|
||||
return(true);
|
||||
}
|
||||
@@ -202,7 +202,7 @@ bool Spawn2::Process() {
|
||||
|
||||
if(tmp->spawn_limit > 0) {
|
||||
if(!entity_list.LimitCheckType(npcid, tmp->spawn_limit)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is over its spawn limit (%d)", spawn2_id, spawngroup_id_, npcid, tmp->spawn_limit);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is over its spawn limit (%d)", spawn2_id, spawngroup_id_, npcid, tmp->spawn_limit);
|
||||
timer.Start(5000); //try again in five seconds.
|
||||
return(true);
|
||||
}
|
||||
@@ -233,10 +233,10 @@ bool Spawn2::Process() {
|
||||
if(sg->roamdist && sg->roambox[0] && sg->roambox[1] && sg->roambox[2] && sg->roambox[3] && sg->delay && sg->min_delay)
|
||||
npc->AI_SetRoambox(sg->roamdist,sg->roambox[0],sg->roambox[1],sg->roambox[2],sg->roambox[3],sg->delay,sg->min_delay);
|
||||
if(zone->InstantGrids()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f).", spawn2_id, spawngroup_id_, npc->GetName(), npcid, x, y, z);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f).", spawn2_id, spawngroup_id_, npc->GetName(), npcid, x, y, z);
|
||||
LoadGrid();
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f). Grid loading delayed.", spawn2_id, spawngroup_id_, tmp->name, npcid, x, y, z);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f). Grid loading delayed.", spawn2_id, spawngroup_id_, tmp->name, npcid, x, y, z);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -261,7 +261,7 @@ void Spawn2::LoadGrid() {
|
||||
//dont set an NPC's grid until its loaded for them.
|
||||
npcthis->SetGrid(grid_);
|
||||
npcthis->AssignWaypoints(grid_);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Loading grid %d for %s", spawn2_id, grid_, npcthis->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Loading grid %d for %s", spawn2_id, grid_, npcthis->GetName());
|
||||
}
|
||||
|
||||
|
||||
@@ -272,21 +272,21 @@ void Spawn2::LoadGrid() {
|
||||
void Spawn2::Reset() {
|
||||
timer.Start(resetTimer());
|
||||
npcthis = nullptr;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
}
|
||||
|
||||
void Spawn2::Depop() {
|
||||
timer.Disable();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop disabled", spawn2_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop disabled", spawn2_id);
|
||||
npcthis = nullptr;
|
||||
}
|
||||
|
||||
void Spawn2::Repop(uint32 delay) {
|
||||
if (delay == 0) {
|
||||
timer.Trigger();
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop immediately.", spawn2_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop immediately.", spawn2_id);
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset for repop, repop in %d ms", spawn2_id, delay);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset for repop, repop in %d ms", spawn2_id, delay);
|
||||
timer.Start(delay);
|
||||
}
|
||||
npcthis = nullptr;
|
||||
@@ -328,7 +328,7 @@ void Spawn2::ForceDespawn()
|
||||
cur = despawnTimer(dtimer);
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d set despawn timer to %d ms.", spawn2_id, spawngroup_id_, cur);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d set despawn timer to %d ms.", spawn2_id, spawngroup_id_, cur);
|
||||
timer.Start(cur);
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ void Spawn2::DeathReset(bool realdeath)
|
||||
if(spawn2_id)
|
||||
{
|
||||
database.UpdateSpawn2Timeleft(spawn2_id, zone->GetInstanceID(), (cur/1000));
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset by death, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset by death, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
//store it to database too
|
||||
}
|
||||
}
|
||||
@@ -466,12 +466,12 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
if(GetSpawnCondition() != c.condition_id)
|
||||
return;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Notified that our spawn condition %d has changed from %d to %d. Our min value is %d.", spawn2_id, c.condition_id, old_value, c.value, condition_min_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Notified that our spawn condition %d has changed from %d to %d. Our min value is %d.", spawn2_id, c.condition_id, old_value, c.value, condition_min_value);
|
||||
|
||||
bool old_state = (old_value >= condition_min_value);
|
||||
bool new_state = (c.value >= condition_min_value);
|
||||
if(old_state == new_state) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our threshold for this condition was not crossed. Doing nothing.", spawn2_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our threshold for this condition was not crossed. Doing nothing.", spawn2_id);
|
||||
return; //no change
|
||||
}
|
||||
|
||||
@@ -479,50 +479,50 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
switch(c.on_change) {
|
||||
case SpawnCondition::DoNothing:
|
||||
//that was easy.
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Taking no action on existing spawn.", spawn2_id, new_state?"enabled":"disabled");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Taking no action on existing spawn.", spawn2_id, new_state?"enabled":"disabled");
|
||||
break;
|
||||
case SpawnCondition::DoDepop:
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Depoping our mob.", spawn2_id, new_state?"enabled":"disabled");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Depoping our mob.", spawn2_id, new_state?"enabled":"disabled");
|
||||
if(npcthis != nullptr)
|
||||
npcthis->Depop(false); //remove the current mob
|
||||
Reset(); //reset our spawn timer
|
||||
break;
|
||||
case SpawnCondition::DoRepop:
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Forcing a repop.", spawn2_id, new_state?"enabled":"disabled");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Forcing a repop.", spawn2_id, new_state?"enabled":"disabled");
|
||||
if(npcthis != nullptr)
|
||||
npcthis->Depop(false); //remove the current mob
|
||||
Repop(); //repop
|
||||
break;
|
||||
case SpawnCondition::DoRepopIfReady:
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Forcing a repop if repsawn timer is expired.", spawn2_id, new_state?"enabled":"disabled");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Forcing a repop if repsawn timer is expired.", spawn2_id, new_state?"enabled":"disabled");
|
||||
if(npcthis != nullptr) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our npcthis is currently not null. The zone thinks it is %s. Forcing a depop.", spawn2_id, npcthis->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our npcthis is currently not null. The zone thinks it is %s. Forcing a depop.", spawn2_id, npcthis->GetName());
|
||||
npcthis->Depop(false); //remove the current mob
|
||||
npcthis = nullptr;
|
||||
}
|
||||
if(new_state) { // only get repawn timer remaining when the SpawnCondition is enabled.
|
||||
timer_remaining = database.GetSpawnTimeLeft(spawn2_id,zone->GetInstanceID());
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns,"Spawn2 %d: Our condition is now %s. The respawn timer_remaining is %d. Forcing a repop if it is <= 0.", spawn2_id, new_state?"enabled":"disabled", timer_remaining);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns,"Spawn2 %d: Our condition is now %s. The respawn timer_remaining is %d. Forcing a repop if it is <= 0.", spawn2_id, new_state?"enabled":"disabled", timer_remaining);
|
||||
if(timer_remaining <= 0)
|
||||
Repop();
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns,"Spawn2 %d: Our condition is now %s. Not checking respawn timer.", spawn2_id, new_state?"enabled":"disabled");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns,"Spawn2 %d: Our condition is now %s. Not checking respawn timer.", spawn2_id, new_state?"enabled":"disabled");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(c.on_change < SpawnCondition::DoSignalMin) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Invalid on-change action %d.", spawn2_id, new_state?"enabled":"disabled", c.on_change);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Invalid on-change action %d.", spawn2_id, new_state?"enabled":"disabled", c.on_change);
|
||||
return; //unknown onchange action
|
||||
}
|
||||
int signal_id = c.on_change - SpawnCondition::DoSignalMin;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Signaling our mob with %d.", spawn2_id, new_state?"enabled":"disabled", signal_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Signaling our mob with %d.", spawn2_id, new_state?"enabled":"disabled", signal_id);
|
||||
if(npcthis != nullptr)
|
||||
npcthis->SignalNPC(signal_id);
|
||||
}
|
||||
}
|
||||
|
||||
void Zone::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Zone notified that spawn condition %d has changed from %d to %d. Notifying all spawn points.", c.condition_id, old_value, c.value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Zone notified that spawn condition %d has changed from %d to %d. Notifying all spawn points.", c.condition_id, old_value, c.value);
|
||||
|
||||
LinkedListIterator<Spawn2*> iterator(spawn2_list);
|
||||
|
||||
@@ -592,7 +592,7 @@ void SpawnConditionManager::Process() {
|
||||
EQTime::AddMinutes(cevent.period, &cevent.next);
|
||||
std::string t;
|
||||
EQTime::ToString(&cevent.next, t);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Will trigger again in %d EQ minutes at %s.", cevent.id, cevent.period, t.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Will trigger again in %d EQ minutes at %s.", cevent.id, cevent.period, t.c_str());
|
||||
//save the next event time in the DB
|
||||
UpdateDBEvent(cevent);
|
||||
//find the next closest event timer.
|
||||
@@ -611,7 +611,7 @@ void SpawnConditionManager::ExecEvent(SpawnEvent &event, bool send_update) {
|
||||
std::map<uint16, SpawnCondition>::iterator condi;
|
||||
condi = spawn_conditions.find(event.condition_id);
|
||||
if(condi == spawn_conditions.end()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Unable to find condition %d to execute on.", event.id, event.condition_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Unable to find condition %d to execute on.", event.id, event.condition_id);
|
||||
return; //unable to find the spawn condition to operate on
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ void SpawnConditionManager::ExecEvent(SpawnEvent &event, bool send_update) {
|
||||
zone->zone_time.getEQTimeOfDay(&tod);
|
||||
if(event.strict && (event.next.hour != tod.hour || event.next.day != tod.day || event.next.month != tod.month || event.next.year != tod.year))
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Unable to execute. Condition is strict, and event time has already passed.", event.id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Unable to execute. Condition is strict, and event time has already passed.", event.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -631,26 +631,26 @@ void SpawnConditionManager::ExecEvent(SpawnEvent &event, bool send_update) {
|
||||
switch(event.action) {
|
||||
case SpawnEvent::ActionSet:
|
||||
new_value = event.argument;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Setting condition %d to %d.", event.id, event.condition_id, event.argument);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Setting condition %d to %d.", event.id, event.condition_id, event.argument);
|
||||
break;
|
||||
case SpawnEvent::ActionAdd:
|
||||
new_value += event.argument;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Adding %d to condition %d, yeilding %d.", event.id, event.argument, event.condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Adding %d to condition %d, yeilding %d.", event.id, event.argument, event.condition_id, new_value);
|
||||
break;
|
||||
case SpawnEvent::ActionSubtract:
|
||||
new_value -= event.argument;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Subtracting %d from condition %d, yeilding %d.", event.id, event.argument, event.condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Subtracting %d from condition %d, yeilding %d.", event.id, event.argument, event.condition_id, new_value);
|
||||
break;
|
||||
case SpawnEvent::ActionMultiply:
|
||||
new_value *= event.argument;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Multiplying condition %d by %d, yeilding %d.", event.id, event.condition_id, event.argument, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Multiplying condition %d by %d, yeilding %d.", event.id, event.condition_id, event.argument, new_value);
|
||||
break;
|
||||
case SpawnEvent::ActionDivide:
|
||||
new_value /= event.argument;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Dividing condition %d by %d, yeilding %d.", event.id, event.condition_id, event.argument, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Dividing condition %d by %d, yeilding %d.", event.id, event.condition_id, event.argument, new_value);
|
||||
break;
|
||||
default:
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Invalid event action type %d", event.id, event.action);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Invalid event action type %d", event.id, event.action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -727,7 +727,7 @@ bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std:
|
||||
std::string timeAsString;
|
||||
EQTime::ToString(&event.next, timeAsString);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "(LoadDBEvent) Loaded %s spawn event %d on condition %d with period %d, action %d, argument %d, strict %d. Will trigger at %s", event.enabled? "enabled": "disabled", event.id, event.condition_id, event.period, event.action, event.argument, event.strict, timeAsString.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "(LoadDBEvent) Loaded %s spawn event %d on condition %d with period %d, action %d, argument %d, strict %d. Will trigger at %s", event.enabled? "enabled": "disabled", event.id, event.condition_id, event.period, event.action, event.argument, event.strict, timeAsString.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -755,7 +755,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
cond.on_change = (SpawnCondition::OnChange) atoi(row[1]);
|
||||
spawn_conditions[cond.condition_id] = cond;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Loaded spawn condition %d with value %d and on_change %d", cond.condition_id, cond.value, cond.on_change);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Loaded spawn condition %d with value %d and on_change %d", cond.condition_id, cond.value, cond.on_change);
|
||||
}
|
||||
|
||||
//load values
|
||||
@@ -811,7 +811,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
|
||||
spawn_events.push_back(event);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "(LoadSpawnConditions) Loaded %s spawn event %d on condition %d with period %d, action %d, argument %d, strict %d", event.enabled? "enabled": "disabled", event.id, event.condition_id, event.period, event.action, event.argument, event.strict);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "(LoadSpawnConditions) Loaded %s spawn event %d on condition %d with period %d, action %d, argument %d, strict %d", event.enabled? "enabled": "disabled", event.id, event.condition_id, event.period, event.action, event.argument, event.strict);
|
||||
}
|
||||
|
||||
//now we need to catch up on events that happened while we were away
|
||||
@@ -846,7 +846,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
|
||||
//watch for special case of all 0s, which means to reset next to now
|
||||
if(cevent.next.year == 0 && cevent.next.month == 0 && cevent.next.day == 0 && cevent.next.hour == 0 && cevent.next.minute == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Initial next trigger time set for spawn event %d", cevent.id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Initial next trigger time set for spawn event %d", cevent.id);
|
||||
memcpy(&cevent.next, &tod, sizeof(cevent.next));
|
||||
//add one period
|
||||
EQTime::AddMinutes(cevent.period, &cevent.next);
|
||||
@@ -857,7 +857,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
|
||||
bool ran = false;
|
||||
while(EQTime::IsTimeBefore(&tod, &cevent.next)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Catch up triggering on event %d", cevent.id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Catch up triggering on event %d", cevent.id);
|
||||
//this event has been triggered.
|
||||
//execute the event
|
||||
if(!cevent.strict || StrictCheck)
|
||||
@@ -900,9 +900,9 @@ void SpawnConditionManager::FindNearestEvent() {
|
||||
}
|
||||
}
|
||||
if(next_id == -1)
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "No spawn events enabled. Disabling next event.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "No spawn events enabled. Disabling next event.");
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Next event determined to be event %d", next_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Next event determined to be event %d", next_id);
|
||||
}
|
||||
|
||||
void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance_id, uint16 condition_id, int16 new_value, bool world_update)
|
||||
@@ -914,14 +914,14 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
||||
std::map<uint16, SpawnCondition>::iterator condi;
|
||||
condi = spawn_conditions.find(condition_id);
|
||||
if(condi == spawn_conditions.end()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d, but we do not have that conditon.", condition_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d, but we do not have that conditon.", condition_id);
|
||||
return; //unable to find the spawn condition
|
||||
}
|
||||
|
||||
SpawnCondition &cond = condi->second;
|
||||
|
||||
if(cond.value == new_value) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d with value %d, which is what we already have.", condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d with value %d, which is what we already have.", condition_id, new_value);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -930,7 +930,7 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
||||
//set our local value
|
||||
cond.value = new_value;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d with value %d", condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d with value %d", condition_id, new_value);
|
||||
|
||||
//now we have to test each spawn point to see if it changed.
|
||||
zone->SpawnConditionChanged(cond, old_value);
|
||||
@@ -941,14 +941,14 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
||||
std::map<uint16, SpawnCondition>::iterator condi;
|
||||
condi = spawn_conditions.find(condition_id);
|
||||
if(condi == spawn_conditions.end()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d, but we do not have that conditon.", condition_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d, but we do not have that conditon.", condition_id);
|
||||
return; //unable to find the spawn condition
|
||||
}
|
||||
|
||||
SpawnCondition &cond = condi->second;
|
||||
|
||||
if(cond.value == new_value) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d with value %d, which is what we already have.", condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d with value %d, which is what we already have.", condition_id, new_value);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -959,7 +959,7 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
||||
//save it in the DB too
|
||||
UpdateDBCondition(zone_short, instance_id, condition_id, new_value);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d with value %d", condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d with value %d", condition_id, new_value);
|
||||
|
||||
//now we have to test each spawn point to see if it changed.
|
||||
zone->SpawnConditionChanged(cond, old_value);
|
||||
@@ -969,7 +969,7 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
||||
//this is a remote spawn condition, update the DB and send
|
||||
//an update packet to the zone if its up
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Remote spawn condition %d set to %d. Updating DB and notifying world.", condition_id, new_value);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Remote spawn condition %d set to %d. Updating DB and notifying world.", condition_id, new_value);
|
||||
|
||||
UpdateDBCondition(zone_short, instance_id, condition_id, new_value);
|
||||
|
||||
@@ -989,7 +989,7 @@ void SpawnConditionManager::SetCondition(const char *zone_short, uint32 instance
|
||||
void SpawnConditionManager::ReloadEvent(uint32 event_id) {
|
||||
std::string zone_short_name;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Requested to reload event %d from the database.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Requested to reload event %d from the database.", event_id);
|
||||
|
||||
//first look for the event in our local event list
|
||||
std::vector<SpawnEvent>::iterator cur,end;
|
||||
@@ -1002,7 +1002,7 @@ void SpawnConditionManager::ReloadEvent(uint32 event_id) {
|
||||
//load the event into the old event slot
|
||||
if(!LoadDBEvent(event_id, cevent, zone_short_name)) {
|
||||
//unable to find the event in the database...
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Failed to reload event %d from the database.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Failed to reload event %d from the database.", event_id);
|
||||
return;
|
||||
}
|
||||
//sync up our nearest event
|
||||
@@ -1015,7 +1015,7 @@ void SpawnConditionManager::ReloadEvent(uint32 event_id) {
|
||||
SpawnEvent e;
|
||||
if(!LoadDBEvent(event_id, e, zone_short_name)) {
|
||||
//unable to find the event in the database...
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Failed to reload event %d from the database.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Failed to reload event %d from the database.", event_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1032,7 +1032,7 @@ void SpawnConditionManager::ReloadEvent(uint32 event_id) {
|
||||
|
||||
void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool strict, bool reset_base) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Request to %s spawn event %d %sresetting trigger time", enabled?"enable":"disable", event_id, reset_base?"":"without ");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Request to %s spawn event %d %sresetting trigger time", enabled?"enable":"disable", event_id, reset_base?"":"without ");
|
||||
|
||||
//first look for the event in our local event list
|
||||
std::vector<SpawnEvent>::iterator cur,end;
|
||||
@@ -1047,13 +1047,13 @@ void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool stri
|
||||
cevent.enabled = enabled;
|
||||
cevent.strict = strict;
|
||||
if(reset_base) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone. State set. Trigger time reset (period %d).", event_id, cevent.period);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone. State set. Trigger time reset (period %d).", event_id, cevent.period);
|
||||
//start with the time now
|
||||
zone->zone_time.getEQTimeOfDay(&cevent.next);
|
||||
//advance the next time by our period
|
||||
EQTime::AddMinutes(cevent.period, &cevent.next);
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone. State changed.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone. State changed.", event_id);
|
||||
}
|
||||
|
||||
//save the event in the DB
|
||||
@@ -1062,7 +1062,7 @@ void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool stri
|
||||
//sync up our nearest event
|
||||
FindNearestEvent();
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone but no change was needed.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone but no change was needed.", event_id);
|
||||
}
|
||||
//even if we dont change anything, we still found it
|
||||
return;
|
||||
@@ -1081,24 +1081,24 @@ void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool stri
|
||||
SpawnEvent e;
|
||||
std::string zone_short_name;
|
||||
if(!LoadDBEvent(event_id, e, zone_short_name)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to find spawn event %d in the database.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to find spawn event %d in the database.", event_id);
|
||||
//unable to find the event in the database...
|
||||
return;
|
||||
}
|
||||
if(e.enabled == enabled && !reset_base) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is not located in this zone but no change was needed.", event_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is not located in this zone but no change was needed.", event_id);
|
||||
return; //no changes.
|
||||
}
|
||||
|
||||
e.enabled = enabled;
|
||||
if(reset_base) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is in zone %s. State set. Trigger time reset (period %d). Notifying world.", event_id, zone_short_name.c_str(), e.period);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is in zone %s. State set. Trigger time reset (period %d). Notifying world.", event_id, zone_short_name.c_str(), e.period);
|
||||
//start with the time now
|
||||
zone->zone_time.getEQTimeOfDay(&e.next);
|
||||
//advance the next time by our period
|
||||
EQTime::AddMinutes(e.period, &e.next);
|
||||
} else {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is in zone %s. State changed. Notifying world.", event_id, zone_short_name.c_str(), e.period);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is in zone %s. State changed. Notifying world.", event_id, zone_short_name.c_str(), e.period);
|
||||
}
|
||||
//save the event in the DB
|
||||
UpdateDBEvent(e);
|
||||
@@ -1123,7 +1123,7 @@ int16 SpawnConditionManager::GetCondition(const char *zone_short, uint32 instanc
|
||||
condi = spawn_conditions.find(condition_id);
|
||||
if(condi == spawn_conditions.end())
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to find local condition %d in Get request.", condition_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to find local condition %d in Get request.", condition_id);
|
||||
return(0); //unable to find the spawn condition
|
||||
}
|
||||
|
||||
@@ -1138,12 +1138,12 @@ int16 SpawnConditionManager::GetCondition(const char *zone_short, uint32 instanc
|
||||
zone_short, instance_id, condition_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to query remote condition %d from zone %s in Get request.", condition_id, zone_short);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to query remote condition %d from zone %s in Get request.", condition_id, zone_short);
|
||||
return 0; //dunno a better thing to do...
|
||||
}
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to load remote condition %d from zone %s in Get request.", condition_id, zone_short);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to load remote condition %d from zone %s in Get request.", condition_id, zone_short);
|
||||
return 0; //dunno a better thing to do...
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3832,7 +3832,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
|
||||
void Corpse::CastRezz(uint16 spellid, Mob* Caster)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Corpse::CastRezz spellid %i, Rezzed() is %i, rezzexp is %i", spellid,IsRezzed(),rez_experience);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Corpse::CastRezz spellid %i, Rezzed() is %i, rezzexp is %i", spellid,IsRezzed(),rez_experience);
|
||||
|
||||
if(IsRezzed()){
|
||||
if(Caster && Caster->IsClient())
|
||||
|
||||
+92
-92
@@ -83,7 +83,7 @@ bool TaskManager::LoadTaskSets() {
|
||||
int taskID = atoi(row[1]);
|
||||
|
||||
TaskSets[taskSet].push_back(taskID);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Adding TaskID %4i to TaskSet %4i", taskID, taskSet);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Adding TaskID %4i to TaskSet %4i", taskID, taskSet);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -91,7 +91,7 @@ bool TaskManager::LoadTaskSets() {
|
||||
|
||||
bool TaskManager::LoadSingleTask(int TaskID) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadSingleTask(%i)", TaskID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadSingleTask(%i)", TaskID);
|
||||
|
||||
if((TaskID <= 0) || (TaskID >= MAXTASKS)) return false;
|
||||
|
||||
@@ -115,21 +115,21 @@ bool TaskManager::LoadSingleTask(int TaskID) {
|
||||
void TaskManager::ReloadGoalLists() {
|
||||
|
||||
if(!GoalListManager.LoadLists())
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
}
|
||||
|
||||
bool TaskManager::LoadTasks(int singleTask) {
|
||||
|
||||
// If TaskID !=0, then just load the task specified.
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadTasks Called");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadTasks Called");
|
||||
|
||||
std::string query;
|
||||
if(singleTask == 0) {
|
||||
if(!GoalListManager.LoadLists())
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
|
||||
if(!LoadTaskSets())
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadTaskSets failed");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadTaskSets failed");
|
||||
|
||||
query = StringFormat("SELECT `id`, `duration`, `title`, `description`, `reward`, "
|
||||
"`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, "
|
||||
@@ -179,11 +179,11 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
Tasks[taskID]->SequenceMode = ActivitiesSequential;
|
||||
Tasks[taskID]->LastStep = 0;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i Repeatable: %s",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i Repeatable: %s",
|
||||
taskID, Tasks[taskID]->Duration, Tasks[taskID]->StartZone, Tasks[taskID]->Reward,
|
||||
Tasks[taskID]->MinLevel, Tasks[taskID]->MaxLevel,
|
||||
Tasks[taskID]->Repeatable ? "Yes" : "No");
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title);
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID = atoi(row[11]);
|
||||
Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Optional = atoi(row[12]);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Activity Slot %2i: ID %i for Task %5i. Type: %3i, GoalID: %8i, "
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Activity Slot %2i: ID %i for Task %5i. Type: %3i, GoalID: %8i, "
|
||||
"GoalMethod: %i, GoalCount: %3i, ZoneID:%3i",
|
||||
Tasks[taskID]->ActivityCount, activityID, taskID,
|
||||
Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type,
|
||||
@@ -282,9 +282,9 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount,
|
||||
Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text1: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text2: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text3: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text1: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text2: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text3: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3);
|
||||
|
||||
Tasks[taskID]->ActivityCount++;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
int characterID = c->CharacterID();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::SaveClientState for character ID %d", characterID);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::SaveClientState for character ID %d", characterID);
|
||||
|
||||
if(state->ActiveTaskCount > 0) {
|
||||
for(int task=0; task<MAXACTIVETASKS; task++) {
|
||||
@@ -316,7 +316,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
if(state->ActiveTasks[task].Updated) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex %i TaskID %i", characterID, task, taskID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex %i TaskID %i", characterID, task, taskID);
|
||||
|
||||
std::string query = StringFormat("REPLACE INTO character_tasks (charid, taskid, slot, acceptedtime) "
|
||||
"VALUES (%i, %i, %i, %i)",
|
||||
@@ -338,7 +338,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
if(!state->ActiveTasks[task].Activity[activityIndex].Updated)
|
||||
continue;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity %i, %i",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity %i, %i",
|
||||
characterID, task, activityIndex);
|
||||
|
||||
if(updatedActivityCount==0)
|
||||
@@ -358,7 +358,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
if(updatedActivityCount == 0)
|
||||
continue;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] Executing query %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] Executing query %s", query.c_str());
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
if(!results.Success()) {
|
||||
@@ -383,7 +383,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
for(unsigned int i=state->LastCompletedTaskLoaded; i<state->CompletedTasks.size(); i++) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState Saving Completed Task at slot %i", i);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState Saving Completed Task at slot %i", i);
|
||||
int taskID = state->CompletedTasks[i].TaskID;
|
||||
|
||||
if((taskID <= 0) || (taskID >= MAXTASKS) || (Tasks[taskID] == nullptr))
|
||||
@@ -459,7 +459,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
state->ActiveTaskCount = 0;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState for character ID %d", characterID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState for character ID %d", characterID);
|
||||
|
||||
std::string query = StringFormat("SELECT `taskid`, `slot`, `acceptedtime` "
|
||||
"FROM `character_tasks` "
|
||||
@@ -501,11 +501,11 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
++state->ActiveTaskCount;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, taskID, acceptedtime);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, taskID, acceptedtime);
|
||||
}
|
||||
|
||||
// Load Activities
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState. Loading activities for character ID %d", characterID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState. Loading activities for character ID %d", characterID);
|
||||
|
||||
query = StringFormat("SELECT `taskid`, `activityid`, `donecount`, `completed` "
|
||||
"FROM `character_activities` "
|
||||
@@ -555,7 +555,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
state->ActiveTasks[activeTaskIndex].Activity[activityID].Updated = false;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, Completed: %i", characterID, taskID, activityID, doneCount, completed);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, Completed: %i", characterID, taskID, activityID, doneCount, completed);
|
||||
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
int taskID = atoi(row[0]);
|
||||
state->EnabledTasks.push_back(taskID);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Adding TaskID %i to enabled tasks", taskID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Adding TaskID %i to enabled tasks", taskID);
|
||||
}
|
||||
|
||||
// Check that there is an entry in the client task state for every activity in each task
|
||||
@@ -676,7 +676,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
if(state->ActiveTasks[i].TaskID != TASKSLOTEMPTY)
|
||||
state->UnlockActivities(characterID, i);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState for Character ID %d DONE!", characterID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState for Character ID %d DONE!", characterID);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -710,9 +710,9 @@ void ClientTaskState::EnableTask(int characterID, int taskCount, int *tasks) {
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
for(unsigned int i=0; i<EnabledTasks.size(); i++)
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
|
||||
if(tasksEnabled.size() == 0 )
|
||||
return;
|
||||
@@ -722,7 +722,7 @@ void ClientTaskState::EnableTask(int characterID, int taskCount, int *tasks) {
|
||||
queryStream << ( i ? ", " : "" ) << StringFormat("(%i, %i)", characterID, tasksEnabled[i]);
|
||||
|
||||
std::string query = queryStream.str();
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
logger.Log(EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::EnableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
@@ -757,9 +757,9 @@ void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) {
|
||||
}
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
for(unsigned int i=0; i<EnabledTasks.size(); i++)
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
|
||||
if(tasksDisabled.size() == 0)
|
||||
return;
|
||||
@@ -771,7 +771,7 @@ void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) {
|
||||
|
||||
queryStream << ")";
|
||||
std::string query = queryStream.str();
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
logger.Log(EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::DisableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
@@ -908,7 +908,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
|
||||
int TaskListIndex = 0;
|
||||
int PlayerLevel = c->GetLevel();
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for taskset %i. EnableTaskSize is %i", TaskSetID,
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for taskset %i. EnableTaskSize is %i", TaskSetID,
|
||||
state->EnabledTasks.size());
|
||||
if((TaskSetID<=0) || (TaskSetID>=MAXTASKSETS)) return;
|
||||
|
||||
@@ -918,7 +918,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
|
||||
|
||||
if(TaskSets[TaskSetID][0] == 0) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSets[%i][0] == 0. All Tasks in Set enabled.", TaskSetID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSets[%i][0] == 0. All Tasks in Set enabled.", TaskSetID);
|
||||
std::vector<int>::iterator Iterator = TaskSets[TaskSetID].begin();
|
||||
|
||||
while((Iterator != TaskSets[TaskSetID].end()) && (TaskListIndex < MAXCHOOSERENTRIES)) {
|
||||
@@ -941,7 +941,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
|
||||
while((EnabledTaskIndex < state->EnabledTasks.size()) && (TaskSetIndex < TaskSets[TaskSetID].size()) &&
|
||||
(TaskListIndex < MAXCHOOSERENTRIES)) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Comparing EnabledTasks[%i] (%i) with TaskSets[%i][%i] (%i)",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Comparing EnabledTasks[%i] (%i) with TaskSets[%i][%i] (%i)",
|
||||
EnabledTaskIndex, state->EnabledTasks[EnabledTaskIndex], TaskSetID, TaskSetIndex,
|
||||
TaskSets[TaskSetID][TaskSetIndex]);
|
||||
|
||||
@@ -981,7 +981,7 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task
|
||||
return;
|
||||
}
|
||||
// Titanium OpCode: 0x5e7c
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
char *Ptr;
|
||||
int PlayerLevel = c->GetLevel();
|
||||
|
||||
@@ -1106,7 +1106,7 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task
|
||||
|
||||
void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *TaskList) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
|
||||
int PlayerLevel = c->GetLevel();
|
||||
|
||||
@@ -1275,7 +1275,7 @@ int ClientTaskState::GetActiveTaskID(int index) {
|
||||
|
||||
static void DeleteCompletedTaskFromDatabase(int charID, int taskID) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] DeleteCompletedTasksFromDatabase. CharID = %i, TaskID = %i", charID, taskID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] DeleteCompletedTasksFromDatabase. CharID = %i, TaskID = %i", charID, taskID);
|
||||
|
||||
const std::string query = StringFormat("DELETE FROM completed_tasks WHERE charid=%i AND taskid = %i", charID, taskID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
@@ -1284,7 +1284,7 @@ static void DeleteCompletedTaskFromDatabase(int charID, int taskID) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Delete query %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Delete query %s", query.c_str());
|
||||
}
|
||||
|
||||
bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
@@ -1298,7 +1298,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
// On loading the client state, all activities that are not completed, are
|
||||
// marked as hidden. For Sequential (non-stepped) mode, we mark the first
|
||||
// activity as active if not complete.
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CharID: %i Task: %i Sequence mode is %i",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CharID: %i Task: %i Sequence mode is %i",
|
||||
CharID, ActiveTasks[TaskIndex].TaskID, Task->SequenceMode);
|
||||
if(Task->SequenceMode == ActivitiesSequential) {
|
||||
|
||||
@@ -1320,7 +1320,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
}
|
||||
if(AllActivitiesComplete && RuleB(TaskSystem, RecordCompletedTasks)) {
|
||||
if(RuleB(TasksSystem, KeepOneRecordPerCompletedTask)) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] KeepOneRecord enabled");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] KeepOneRecord enabled");
|
||||
std::vector<CompletedTaskInformation>::iterator Iterator = CompletedTasks.begin();
|
||||
int ErasedElements = 0;
|
||||
while(Iterator != CompletedTasks.end()) {
|
||||
@@ -1332,7 +1332,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
else
|
||||
++Iterator;
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements);
|
||||
if(ErasedElements) {
|
||||
LastCompletedTaskLoaded -= ErasedElements;
|
||||
DeleteCompletedTaskFromDatabase(CharID, ActiveTasks[TaskIndex].TaskID);
|
||||
@@ -1349,7 +1349,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
|
||||
CompletedTasks.push_back(cti);
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Returning sequential task, AllActivitiesComplete is %i", AllActivitiesComplete);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Returning sequential task, AllActivitiesComplete is %i", AllActivitiesComplete);
|
||||
return AllActivitiesComplete;
|
||||
}
|
||||
|
||||
@@ -1358,7 +1358,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
|
||||
bool CurrentStepComplete = true;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", ActiveTasks[TaskIndex].CurrentStep, Task->LastStep);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", ActiveTasks[TaskIndex].CurrentStep, Task->LastStep);
|
||||
// If CurrentStep is -1, this is the first call to this method since loading the
|
||||
// client state. Unlock all activities with a step number of 0
|
||||
if(ActiveTasks[TaskIndex].CurrentStep == -1) {
|
||||
@@ -1393,7 +1393,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
// If we are only keeping one completed record per task, and the player has done
|
||||
// the same task again, erase the previous completed entry for this task.
|
||||
if(RuleB(TasksSystem, KeepOneRecordPerCompletedTask)) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] KeepOneRecord enabled");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] KeepOneRecord enabled");
|
||||
std::vector<CompletedTaskInformation>::iterator Iterator = CompletedTasks.begin();
|
||||
int ErasedElements = 0;
|
||||
while(Iterator != CompletedTasks.end()) {
|
||||
@@ -1405,7 +1405,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
else
|
||||
++Iterator;
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements);
|
||||
if(ErasedElements) {
|
||||
LastCompletedTaskLoaded -= ErasedElements;
|
||||
DeleteCompletedTaskFromDatabase(CharID, ActiveTasks[TaskIndex].TaskID);
|
||||
@@ -1455,7 +1455,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI
|
||||
|
||||
int Ret = false;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasks for NPCTypeID: %d", NPCTypeID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasks for NPCTypeID: %d", NPCTypeID);
|
||||
|
||||
// If the client has no tasks, there is nothing further to check.
|
||||
|
||||
@@ -1477,7 +1477,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI
|
||||
if(Task->Activity[j].Type != ActivityType) continue;
|
||||
// Is there a zone restriction on the activity ?
|
||||
if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone check",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone check",
|
||||
c->GetName(), ActiveTasks[i].TaskID, j, ActivityType, NPCTypeID);
|
||||
continue;
|
||||
}
|
||||
@@ -1498,7 +1498,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI
|
||||
continue;
|
||||
}
|
||||
// We found an active task to kill this type of NPC, so increment the done count
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Calling increment done count ByNPC");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Calling increment done count ByNPC");
|
||||
IncrementDoneCount(c, Task, i, j);
|
||||
Ret = true;
|
||||
}
|
||||
@@ -1577,7 +1577,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI
|
||||
|
||||
// If the client has no tasks, there is nothing further to check.
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForItem(%d,%d)", Type, ItemID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForItem(%d,%d)", Type, ItemID);
|
||||
|
||||
if(ActiveTaskCount == 0) return;
|
||||
|
||||
@@ -1597,7 +1597,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI
|
||||
if(Task->Activity[j].Type != (int)Type) continue;
|
||||
// Is there a zone restriction on the activity ?
|
||||
if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Activity type %i for Item %i failed zone check",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Activity type %i for Item %i failed zone check",
|
||||
c->GetName(), Type, ItemID);
|
||||
continue;
|
||||
}
|
||||
@@ -1618,7 +1618,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI
|
||||
continue;
|
||||
}
|
||||
// We found an active task related to this item, so increment the done count
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Calling increment done count ForItem");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Calling increment done count ForItem");
|
||||
IncrementDoneCount(c, Task, i, j, Count);
|
||||
}
|
||||
}
|
||||
@@ -1630,7 +1630,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) {
|
||||
|
||||
// If the client has no tasks, there is nothing further to check.
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnExplore(%i)", ExploreID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnExplore(%i)", ExploreID);
|
||||
if(ActiveTaskCount == 0) return;
|
||||
|
||||
for(int i=0; i<MAXACTIVETASKS; i++) {
|
||||
@@ -1648,7 +1648,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) {
|
||||
// We are only interested in explore activities
|
||||
if(Task->Activity[j].Type != ActivityExplore) continue;
|
||||
if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Explore exploreid %i failed zone check",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Explore exploreid %i failed zone check",
|
||||
c->GetName(), ExploreID);
|
||||
continue;
|
||||
}
|
||||
@@ -1670,7 +1670,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) {
|
||||
}
|
||||
// We found an active task to explore this area, so set done count to goal count
|
||||
// (Only a goal count of 1 makes sense for explore activities?)
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on explore");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on explore");
|
||||
IncrementDoneCount(c, Task, i, j,
|
||||
Task->Activity[j].GoalCount - ActiveTasks[i].Activity[j].DoneCount);
|
||||
|
||||
@@ -1684,7 +1684,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, uint32 *Items, int Cash, i
|
||||
|
||||
bool Ret = false;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForOnDeliver(%d)", NPCTypeID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForOnDeliver(%d)", NPCTypeID);
|
||||
|
||||
if(ActiveTaskCount == 0) return false;
|
||||
|
||||
@@ -1705,7 +1705,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, uint32 *Items, int Cash, i
|
||||
(Task->Activity[j].Type != ActivityGiveCash)) continue;
|
||||
// Is there a zone restriction on the activity ?
|
||||
if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Deliver activity failed zone check (current zone %i, need zone %i",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Deliver activity failed zone check (current zone %i, need zone %i",
|
||||
c->GetName(), zone->GetZoneID(), Task->Activity[j].ZoneID);
|
||||
continue;
|
||||
}
|
||||
@@ -1714,7 +1714,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, uint32 *Items, int Cash, i
|
||||
// Is the activity related to these items ?
|
||||
//
|
||||
if((Task->Activity[j].Type == ActivityGiveCash) && Cash) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on GiveCash");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on GiveCash");
|
||||
IncrementDoneCount(c, Task, i, j, Cash);
|
||||
Ret = true;
|
||||
}
|
||||
@@ -1738,7 +1738,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, uint32 *Items, int Cash, i
|
||||
continue;
|
||||
}
|
||||
// We found an active task related to this item, so increment the done count
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on GiveItem");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on GiveItem");
|
||||
IncrementDoneCount(c, Task, i, j, 1);
|
||||
Ret = true;
|
||||
}
|
||||
@@ -1753,7 +1753,7 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) {
|
||||
|
||||
// If the client has no tasks, there is nothing further to check.
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnTouch(%i)", ZoneID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnTouch(%i)", ZoneID);
|
||||
if(ActiveTaskCount == 0) return;
|
||||
|
||||
for(int i=0; i<MAXACTIVETASKS; i++) {
|
||||
@@ -1772,13 +1772,13 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) {
|
||||
if(Task->Activity[j].Type != ActivityTouch) continue;
|
||||
if(Task->Activity[j].GoalMethod != METHODSINGLEID) continue;
|
||||
if(Task->Activity[j].ZoneID != ZoneID) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Touch activity failed zone check",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Touch activity failed zone check",
|
||||
c->GetName());
|
||||
continue;
|
||||
}
|
||||
// We found an active task to zone into this zone, so set done count to goal count
|
||||
// (Only a goal count of 1 makes sense for touch activities?)
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on Touch");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on Touch");
|
||||
IncrementDoneCount(c, Task, i, j,
|
||||
Task->Activity[j].GoalCount - ActiveTasks[i].Activity[j].DoneCount);
|
||||
}
|
||||
@@ -1788,7 +1788,7 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) {
|
||||
}
|
||||
void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int TaskIndex, int ActivityID, int Count, bool ignore_quest_update) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] IncrementDoneCount");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] IncrementDoneCount");
|
||||
|
||||
ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount += Count;
|
||||
|
||||
@@ -1805,7 +1805,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T
|
||||
ActiveTasks[TaskIndex].Activity[ActivityID].Updated=true;
|
||||
// Have we reached the goal count for this activity ?
|
||||
if(ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount >= Task->Activity[ActivityID].GoalCount) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Done (%i) = Goal (%i) for Activity %i",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Done (%i) = Goal (%i) for Activity %i",
|
||||
ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount,
|
||||
Task->Activity[ActivityID].GoalCount,
|
||||
ActivityID);
|
||||
@@ -1814,7 +1814,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T
|
||||
ActiveTasks[TaskIndex].Activity[ActivityID].State = ActivityCompleted;
|
||||
// Unlock subsequent activities for this task
|
||||
bool TaskComplete = UnlockActivities(c->CharacterID(), TaskIndex);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskCompleted is %i", TaskComplete);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskCompleted is %i", TaskComplete);
|
||||
// and by the 'Task Stage Completed' message
|
||||
c->SendTaskActivityComplete(ActiveTasks[TaskIndex].TaskID, ActivityID, TaskIndex);
|
||||
// Send the updated task/activity list to the client
|
||||
@@ -1991,7 +1991,7 @@ bool ClientTaskState::IsTaskActive(int TaskID) {
|
||||
|
||||
void ClientTaskState::FailTask(Client *c, int TaskID) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] FailTask %i, ActiveTaskCount is %i", TaskID, ActiveTaskCount);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] FailTask %i, ActiveTaskCount is %i", TaskID, ActiveTaskCount);
|
||||
if(ActiveTaskCount == 0) return;
|
||||
|
||||
for(int i=0; i<MAXACTIVETASKS; i++) {
|
||||
@@ -2009,7 +2009,7 @@ void ClientTaskState::FailTask(Client *c, int TaskID) {
|
||||
|
||||
bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i).", TaskID, ActivityID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i).", TaskID, ActivityID);
|
||||
// Quick sanity check
|
||||
if(ActivityID<0) return false;
|
||||
if(ActiveTaskCount == 0) return false;
|
||||
@@ -2034,7 +2034,7 @@ bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) {
|
||||
// The ActivityID is out of range
|
||||
if(ActivityID >= Task->ActivityCount) return false;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i). State is %i ", TaskID, ActivityID,
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i). State is %i ", TaskID, ActivityID,
|
||||
ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State);
|
||||
|
||||
|
||||
@@ -2045,7 +2045,7 @@ bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) {
|
||||
void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID, int Count, bool ignore_quest_update /*= false*/)
|
||||
{
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, %i).", TaskID, ActivityID, Count);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, %i).", TaskID, ActivityID, Count);
|
||||
|
||||
// Quick sanity check
|
||||
if((ActivityID<0) || (ActiveTaskCount==0)) return;
|
||||
@@ -2072,14 +2072,14 @@ void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID,
|
||||
|
||||
// The Activity is not currently active
|
||||
if(ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return;
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment done count on UpdateTaskActivity");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment done count on UpdateTaskActivity");
|
||||
IncrementDoneCount(c, Task, ActiveTaskIndex, ActivityID, Count, ignore_quest_update);
|
||||
|
||||
}
|
||||
|
||||
void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, 0).", TaskID, ActivityID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, 0).", TaskID, ActivityID);
|
||||
|
||||
// Quick sanity check
|
||||
if((ActivityID<0) || (ActiveTaskCount==0)) return;
|
||||
@@ -2107,7 +2107,7 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) {
|
||||
// The Activity is not currently active
|
||||
if(ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ResetTaskActivityCount");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ResetTaskActivityCount");
|
||||
|
||||
ActiveTasks[ActiveTaskIndex].Activity[ActivityID].DoneCount = 0;
|
||||
|
||||
@@ -2173,7 +2173,7 @@ int ClientTaskState::IsTaskCompleted(int TaskID) {
|
||||
if(!(RuleB(TaskSystem, RecordCompletedTasks))) return -1;
|
||||
|
||||
for(unsigned int i=0; i<CompletedTasks.size(); i++) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Comparing completed task %i with %i", CompletedTasks[i].TaskID, TaskID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Comparing completed task %i with %i", CompletedTasks[i].TaskID, TaskID);
|
||||
if(CompletedTasks[i].TaskID == TaskID) return 1;
|
||||
}
|
||||
|
||||
@@ -2275,7 +2275,7 @@ void Client::SendTaskComplete(int TaskIndex) {
|
||||
|
||||
void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Task History Requested for Completed Task Index %i", TaskIndex);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Task History Requested for Completed Task Index %i", TaskIndex);
|
||||
|
||||
// We only sent the most recent 50 completed tasks, so we need to offset the Index the client sent to us.
|
||||
|
||||
@@ -2406,7 +2406,7 @@ void Client::SendTaskFailed(int TaskID, int TaskIndex) {
|
||||
//tac->unknown5 = 0x00000001;
|
||||
tac->unknown5 = 0; // 0 for task complete or failed.
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskFailed");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskFailed");
|
||||
_pkt(TASKS__PACKETS, outapp);
|
||||
|
||||
QueuePacket(outapp);
|
||||
@@ -2428,7 +2428,7 @@ void TaskManager::SendCompletedTasksToClient(Client *c, ClientTaskState *State)
|
||||
if(State->CompletedTasks.size() > 50)
|
||||
FirstTaskToSend = State->CompletedTasks.size() - 50;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Completed Task Count: %i, First Task to send is %i, Last is %i",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Completed Task Count: %i, First Task to send is %i, Last is %i",
|
||||
State->CompletedTasks.size(), FirstTaskToSend, LastTaskToSend);
|
||||
/*
|
||||
for(iterator=State->CompletedTasks.begin(); iterator!=State->CompletedTasks.end(); iterator++) {
|
||||
@@ -2689,12 +2689,12 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) {
|
||||
int StartTime = c->GetTaskStartTime(TaskIndex);
|
||||
|
||||
SendActiveTaskDescription(c, TaskID, TaskIndex, StartTime, Tasks[TaskID]->Duration, false);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID));
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID));
|
||||
|
||||
int Sequence = 0;
|
||||
for(int Activity=0; Activity<GetActivityCount(TaskID); Activity++) {
|
||||
if(c->GetTaskActivityState(TaskIndex, Activity) != ActivityHidden) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete);
|
||||
if(Activity==GetActivityCount(TaskID)-1)
|
||||
SendTaskActivityLong(c, TaskID, Activity, TaskIndex,
|
||||
Tasks[TaskID]->Activity[Activity].Optional,
|
||||
@@ -2704,7 +2704,7 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) {
|
||||
Tasks[TaskID]->Activity[Activity].Optional, 0);
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex);
|
||||
SendTaskActivityShort(c, TaskID, Activity, TaskIndex);
|
||||
}
|
||||
Sequence++;
|
||||
@@ -2725,13 +2725,13 @@ void TaskManager::SendSingleActiveTaskToClient(Client *c, int TaskIndex, bool Ta
|
||||
|
||||
int StartTime = c->GetTaskStartTime(TaskIndex);
|
||||
SendActiveTaskDescription(c, TaskID, TaskIndex, StartTime, Tasks[TaskID]->Duration, BringUpTaskJournal);
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] SendSingleActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID));
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] SendSingleActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID));
|
||||
|
||||
int Sequence = 0;
|
||||
|
||||
for(int Activity=0; Activity<GetActivityCount(TaskID); Activity++) {
|
||||
if(c->GetTaskActivityState(TaskIndex, Activity) != ActivityHidden) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete);
|
||||
if(Activity==GetActivityCount(TaskID)-1)
|
||||
SendTaskActivityLong(c, TaskID, Activity, TaskIndex,
|
||||
Tasks[TaskID]->Activity[Activity].Optional, TaskComplete);
|
||||
@@ -2740,7 +2740,7 @@ void TaskManager::SendSingleActiveTaskToClient(Client *c, int TaskIndex, bool Ta
|
||||
Tasks[TaskID]->Activity[Activity].Optional, 0);
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex);
|
||||
SendTaskActivityShort(c, TaskID, Activity, TaskIndex);
|
||||
}
|
||||
Sequence++;
|
||||
@@ -2919,7 +2919,7 @@ void ClientTaskState::CancelTask(Client *c, int SequenceNumber, bool RemoveFromD
|
||||
cts->SequenceNumber = SequenceNumber;
|
||||
cts->unknown4 = 0x00000002;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask");
|
||||
_pkt(TASKS__PACKETS, outapp);
|
||||
|
||||
c->QueuePacket(outapp);
|
||||
@@ -2932,7 +2932,7 @@ void ClientTaskState::CancelTask(Client *c, int SequenceNumber, bool RemoveFromD
|
||||
void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) {
|
||||
|
||||
int characterID = c->CharacterID();
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState Cancel Task %i ", sequenceNumber);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState Cancel Task %i ", sequenceNumber);
|
||||
|
||||
std::string query = StringFormat("DELETE FROM character_activities WHERE charid=%i AND taskid = %i",
|
||||
characterID, ActiveTasks[sequenceNumber].TaskID);
|
||||
@@ -2941,7 +2941,7 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) {
|
||||
logger.Log(EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask: %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask: %s", query.c_str());
|
||||
|
||||
query = StringFormat("DELETE FROM character_tasks WHERE charid=%i AND taskid = %i",
|
||||
characterID, ActiveTasks[sequenceNumber].TaskID);
|
||||
@@ -2949,7 +2949,7 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) {
|
||||
if(!results.Success())
|
||||
logger.Log(EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask: %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask: %s", query.c_str());
|
||||
|
||||
ActiveTasks[sequenceNumber].TaskID = TASKSLOTEMPTY;
|
||||
ActiveTaskCount--;
|
||||
@@ -2990,7 +2990,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID) {
|
||||
//
|
||||
int FreeSlot = -1;
|
||||
for(int i=0; i<MAXACTIVETASKS; i++) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState Looking for free slot in slot %i, found TaskID of %i",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState Looking for free slot in slot %i, found TaskID of %i",
|
||||
i, ActiveTasks[i].TaskID);
|
||||
if(ActiveTasks[i].TaskID == 0) {
|
||||
FreeSlot = i;
|
||||
@@ -3045,11 +3045,11 @@ void ClientTaskState::ProcessTaskProximities(Client *c, float X, float Y, float
|
||||
|
||||
if((LastX==X) && (LastY==Y) && (LastZ==Z)) return;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Checking proximities for Position %8.3f, %8.3f, %8.3f\n", X, Y, Z);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Checking proximities for Position %8.3f, %8.3f, %8.3f\n", X, Y, Z);
|
||||
int ExploreID = taskmanager->ProximityManager.CheckProximities(X, Y, Z);
|
||||
|
||||
if(ExploreID>0) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Position %8.3f, %8.3f, %8.3f is within proximity %i\n", X, Y, Z, ExploreID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Position %8.3f, %8.3f, %8.3f is within proximity %i\n", X, Y, Z, ExploreID);
|
||||
UpdateTasksOnExplore(c, ExploreID);
|
||||
}
|
||||
}
|
||||
@@ -3073,7 +3073,7 @@ TaskGoalListManager::~TaskGoalListManager() {
|
||||
|
||||
bool TaskGoalListManager::LoadLists() {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskGoalListManager::LoadLists Called");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskGoalListManager::LoadLists Called");
|
||||
|
||||
for(int i=0; i< NumberOfLists; i++)
|
||||
safe_delete_array(TaskGoalLists[i].GoalItemEntries);
|
||||
@@ -3093,7 +3093,7 @@ bool TaskGoalListManager::LoadLists() {
|
||||
}
|
||||
|
||||
NumberOfLists = results.RowCount();
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Database returned a count of %i lists", NumberOfLists);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Database returned a count of %i lists", NumberOfLists);
|
||||
|
||||
TaskGoalLists = new TaskGoalList_Struct[NumberOfLists];
|
||||
|
||||
@@ -3207,7 +3207,7 @@ std::vector<int> TaskGoalListManager::GetListContents(int ListID) {
|
||||
|
||||
bool TaskGoalListManager::IsInList(int ListID, int Entry) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i)", ListID, Entry);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i)", ListID, Entry);
|
||||
|
||||
int ListIndex = GetListByID(ListID);
|
||||
|
||||
@@ -3227,7 +3227,7 @@ bool TaskGoalListManager::IsInList(int ListID, int Entry) {
|
||||
else if(Entry < TaskGoalLists[ListIndex].GoalItemEntries[MiddleEntry])
|
||||
LastEntry = MiddleEntry - 1;
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i) returning true", ListIndex, Entry);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i) returning true", ListIndex, Entry);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3250,7 +3250,7 @@ TaskProximityManager::~TaskProximityManager() {
|
||||
bool TaskProximityManager::LoadProximities(int zoneID) {
|
||||
TaskProximity proximity;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskProximityManager::LoadProximities Called for zone %i", zoneID);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskProximityManager::LoadProximities Called for zone %i", zoneID);
|
||||
TaskProximities.clear();
|
||||
|
||||
std::string query = StringFormat("SELECT `exploreid`, `minx`, `maxx`, "
|
||||
@@ -3285,7 +3285,7 @@ int TaskProximityManager::CheckProximities(float X, float Y, float Z) {
|
||||
|
||||
TaskProximity* P = &TaskProximities[i];
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Checking %8.3f, %8.3f, %8.3f against %8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f",
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Checking %8.3f, %8.3f, %8.3f against %8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f",
|
||||
X, Y, Z, P->MinX, P->MaxX, P->MinY, P->MaxY, P->MinZ, P->MaxZ);
|
||||
|
||||
if(X < P->MinX || X > P->MaxX || Y < P->MinY || Y > P->MaxY ||
|
||||
|
||||
@@ -901,7 +901,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
//handle caps
|
||||
if(spec->nofail) {
|
||||
chance = 100; //cannot fail.
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...This combine cannot fail.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...This combine cannot fail.");
|
||||
} else if(over_trivial >= 0) {
|
||||
// At reaching trivial the chance goes to 95% going up an additional
|
||||
// percent for every 40 skillpoints above the trivial.
|
||||
@@ -921,8 +921,8 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
chance = 95;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Current skill: %d , Trivial: %d , Success chance: %f percent", user_skill , spec->trivial , chance);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Bonusstat: %d , INT: %d , WIS: %d , DEX: %d , STR: %d", bonusstat , GetINT() , GetWIS() , GetDEX() , GetSTR());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Current skill: %d , Trivial: %d , Success chance: %f percent", user_skill , spec->trivial , chance);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Bonusstat: %d , INT: %d , WIS: %d , DEX: %d , STR: %d", bonusstat , GetINT() , GetWIS() , GetDEX() , GetSTR());
|
||||
|
||||
float res = zone->random.Real(0, 99);
|
||||
int aa_chance = 0;
|
||||
@@ -1066,7 +1066,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
|
||||
Message_StringID(4, TRADESKILL_SUCCEED, spec->name.c_str());
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "Tradeskill success");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "Tradeskill success");
|
||||
|
||||
itr = spec->onsuccess.begin();
|
||||
while(itr != spec->onsuccess.end() && !spec->quest) {
|
||||
@@ -1098,7 +1098,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
|
||||
Message_StringID(MT_Emote,TRADESKILL_FAILED);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "Tradeskill failed");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "Tradeskill failed");
|
||||
if (this->GetGroup())
|
||||
{
|
||||
entity_list.MessageGroup(this,true,MT_Skills,"%s was unsuccessful in %s tradeskill attempt.",GetName(),this->GetGender() == 0 ? "his" : this->GetGender() == 1 ? "her" : "its");
|
||||
@@ -1177,9 +1177,9 @@ void Client::CheckIncreaseTradeskill(int16 bonusstat, int16 stat_modifier, float
|
||||
NotifyNewTitlesAvailable();
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...skillup_modifier: %f , success_modifier: %d , stat modifier: %d", skillup_modifier , success_modifier , stat_modifier);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage1 chance was: %f percent", chance_stage1);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage2 chance was: %f percent. 0 percent means stage1 failed", chance_stage2);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...skillup_modifier: %f , success_modifier: %d , stat modifier: %d", skillup_modifier , success_modifier , stat_modifier);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage1 chance was: %f percent", chance_stage1);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage2 chance was: %f percent. 0 percent means stage1 failed", chance_stage2);
|
||||
}
|
||||
|
||||
bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint32 some_id,
|
||||
|
||||
+28
-28
@@ -126,7 +126,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
|
||||
inst2->SetCharges(stack_size + inst2->GetCharges());
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s added partial item '%s' stack (qty: %i) to trade slot %i", owner->GetName(), inst->GetItem()->Name, stack_size, trade_slot_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s added partial item '%s' stack (qty: %i) to trade slot %i", owner->GetName(), inst->GetItem()->Name, stack_size, trade_slot_id);
|
||||
|
||||
if (_stack_size > 0)
|
||||
inst->SetCharges(_stack_size);
|
||||
@@ -143,7 +143,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
|
||||
|
||||
SendItemData(inst, trade_slot_id);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s added item '%s' to trade slot %i", owner->GetName(), inst->GetItem()->Name, trade_slot_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s added item '%s' to trade slot %i", owner->GetName(), inst->GetItem()->Name, trade_slot_id);
|
||||
|
||||
client->PutItemInInventory(trade_slot_id, *inst);
|
||||
client->DeleteItemInInventory(MainCursor);
|
||||
@@ -1160,7 +1160,7 @@ void Client::SendTraderItem(uint32 ItemID, uint16 Quantity) {
|
||||
const Item_Struct* item = database.GetItem(ItemID);
|
||||
|
||||
if(!item){
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bogus item deleted in Client::SendTraderItem!\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bogus item deleted in Client::SendTraderItem!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1219,10 +1219,10 @@ void Client::BulkSendTraderInventory(uint32 char_id) {
|
||||
safe_delete(inst);
|
||||
}
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr inst pointer");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr inst pointer");
|
||||
}
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr item pointer or item is NODROP %8X",item);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr item pointer or item is NODROP %8X",item);
|
||||
}
|
||||
safe_delete(TraderItems);
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ ItemInst* Client::FindTraderItemBySerialNumber(int32 SerialNumber){
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::FindTraderItemBySerialNumber Couldn't find item! Serial No. was %i", SerialNumber);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::FindTraderItemBySerialNumber Couldn't find item! Serial No. was %i", SerialNumber);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1302,7 +1302,7 @@ uint16 Client::FindTraderItem(int32 SerialNumber, uint16 Quantity){
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Could NOT find a match for Item: %i with a quantity of: %i on Trader: %s\n",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Could NOT find a match for Item: %i with a quantity of: %i on Trader: %s\n",
|
||||
SerialNumber , Quantity, this->GetName());
|
||||
|
||||
return 0;
|
||||
@@ -1311,7 +1311,7 @@ uint16 Client::FindTraderItem(int32 SerialNumber, uint16 Quantity){
|
||||
void Client::NukeTraderItem(uint16 Slot,int16 Charges,uint16 Quantity,Client* Customer,uint16 TraderSlot, int SerialNumber) {
|
||||
|
||||
if(!Customer) return;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "NukeTraderItem(Slot %i, Charges %i, Quantity %i", Slot, Charges, Quantity);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "NukeTraderItem(Slot %i, Charges %i, Quantity %i", Slot, Charges, Quantity);
|
||||
if(Quantity < Charges) {
|
||||
Customer->SendSingleTraderItem(this->CharacterID(), SerialNumber);
|
||||
m_inv.DeleteItem(Slot, Quantity);
|
||||
@@ -1395,7 +1395,7 @@ void Client::FindAndNukeTraderItem(int32 SerialNumber, uint16 Quantity, Client*
|
||||
if(!Stackable)
|
||||
Quantity = (Charges > 0) ? Charges : 1;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "FindAndNuke %s, Charges %i, Quantity %i", item->GetItem()->Name, Charges, Quantity);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "FindAndNuke %s, Charges %i, Quantity %i", item->GetItem()->Name, Charges, Quantity);
|
||||
}
|
||||
if(item && (Charges <= Quantity || (Charges <= 0 && Quantity==1) || !Stackable)){
|
||||
this->DeleteItemInInventory(SlotID, Quantity);
|
||||
@@ -1431,7 +1431,7 @@ void Client::FindAndNukeTraderItem(int32 SerialNumber, uint16 Quantity, Client*
|
||||
|
||||
}
|
||||
}
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Could NOT find a match for Item: %i with a quantity of: %i on Trader: %s\n",SerialNumber,
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Could NOT find a match for Item: %i with a quantity of: %i on Trader: %s\n",SerialNumber,
|
||||
Quantity,this->GetName());
|
||||
}
|
||||
|
||||
@@ -1510,13 +1510,13 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs,Client* Trader,const EQApplicat
|
||||
const ItemInst* BuyItem = Trader->FindTraderItemBySerialNumber(tbs->ItemID);
|
||||
|
||||
if(!BuyItem) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item on trader.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item on trader.");
|
||||
TradeRequestFailed(app);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Buyitem: Name: %s, IsStackable: %i, Requested Quantity: %i, Charges on Item %i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Buyitem: Name: %s, IsStackable: %i, Requested Quantity: %i, Charges on Item %i",
|
||||
BuyItem->GetItem()->Name, BuyItem->IsStackable(), tbs->Quantity, BuyItem->GetCharges());
|
||||
// If the item is not stackable, then we can only be buying one of them.
|
||||
if(!BuyItem->IsStackable())
|
||||
@@ -1534,7 +1534,7 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs,Client* Trader,const EQApplicat
|
||||
outtbs->Quantity = tbs->Quantity;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Actual quantity that will be traded is %i", outtbs->Quantity);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Actual quantity that will be traded is %i", outtbs->Quantity);
|
||||
|
||||
if((tbs->Price * outtbs->Quantity) <= 0) {
|
||||
Message(13, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1");
|
||||
@@ -1840,7 +1840,7 @@ void Client::SendBazaarResults(uint32 TraderID, uint32 Class_, uint32 Race, uint
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "SRCH: %s", query.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "SRCH: %s", query.c_str());
|
||||
|
||||
int Size = 0;
|
||||
uint32 ID = 0;
|
||||
@@ -1887,7 +1887,7 @@ void Client::SendBazaarResults(uint32 TraderID, uint32 Class_, uint32 Race, uint
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, bufptr, ID);
|
||||
}
|
||||
else{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find trader: %i\n",atoi(row[1]));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find trader: %i\n",atoi(row[1]));
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, bufptr, 0);
|
||||
}
|
||||
Cost = atoi(row[5]);
|
||||
@@ -1981,7 +1981,7 @@ static void UpdateTraderCustomerItemsAdded(uint32 CustomerID, TraderCharges_Stru
|
||||
if(inst->IsStackable())
|
||||
inst->SetMerchantCount(gis->Charges[i]);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price update for %s, Serial No. %i with %i charges",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price update for %s, Serial No. %i with %i charges",
|
||||
item->Name, gis->SerialNumber[i], gis->Charges[i]);
|
||||
|
||||
Customer->SendItemPacket(30, inst, ItemPacketMerchant); // MainCursor?
|
||||
@@ -2018,7 +2018,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St
|
||||
|
||||
if(gis->ItemID[i] == ItemID) {
|
||||
tdis->ItemID = gis->SerialNumber[i];
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Telling customer to remove item %i with %i charges and S/N %i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Telling customer to remove item %i with %i charges and S/N %i",
|
||||
ItemID, Charges, gis->SerialNumber[i]);
|
||||
|
||||
_pkt(TRADING__PACKETS, outapp);
|
||||
@@ -2031,7 +2031,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price updates to customer %s", Customer->GetName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price updates to customer %s", Customer->GetName());
|
||||
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
|
||||
@@ -2057,7 +2057,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St
|
||||
|
||||
inst->SetMerchantSlot(gis->SerialNumber[i]);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price update for %s, Serial No. %i with %i charges",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price update for %s, Serial No. %i with %i charges",
|
||||
item->Name, gis->SerialNumber[i], gis->Charges[i]);
|
||||
|
||||
Customer->SendItemPacket(30, inst, ItemPacketMerchant); // MainCursor??
|
||||
@@ -2073,7 +2073,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
//
|
||||
TraderPriceUpdate_Struct* tpus = (TraderPriceUpdate_Struct*)app->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Received Price Update for %s, Item Serial No. %i, New Price %i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Received Price Update for %s, Item Serial No. %i, New Price %i",
|
||||
GetName(), tpus->SerialNumber, tpus->NewPrice);
|
||||
|
||||
// Pull the items this Trader currently has for sale from the trader table.
|
||||
@@ -2101,7 +2101,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
if((gis->ItemID[i] > 0) && (gis->SerialNumber[i] == tpus->SerialNumber)) {
|
||||
// We found the item that the Trader wants to change the price of (or add back up for sale).
|
||||
//
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ItemID is %i, Charges is %i", gis->ItemID[i], gis->Charges[i]);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ItemID is %i, Charges is %i", gis->ItemID[i], gis->Charges[i]);
|
||||
|
||||
IDOfItemToUpdate = gis->ItemID[i];
|
||||
|
||||
@@ -2127,7 +2127,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
return ;
|
||||
}
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item to update price for. Rechecking trader satchels");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item to update price for. Rechecking trader satchels");
|
||||
|
||||
// Find what is in their Trader Satchels
|
||||
GetItems_Struct* newgis=GetTraderItems();
|
||||
@@ -2140,7 +2140,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
|
||||
if((newgis->Items[i] > 0) && (newgis->SerialNumber[i] == tpus->SerialNumber)) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Found new Item to Add, ItemID is %i, Charges is %i", newgis->Items[i],
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Found new Item to Add, ItemID is %i, Charges is %i", newgis->Items[i],
|
||||
newgis->Charges[i]);
|
||||
|
||||
IDOfItemToAdd = newgis->Items[i];
|
||||
@@ -2158,7 +2158,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
|
||||
if(!IDOfItemToAdd || !item) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item not found in Trader Satchels either.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item not found in Trader Satchels either.");
|
||||
tpus->SubAction = BazaarPriceChange_Fail;
|
||||
QueuePacket(app);
|
||||
Trader_EndTrader();
|
||||
@@ -2203,7 +2203,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
gis->SerialNumber[i] = newgis->SerialNumber[i];
|
||||
gis->ItemCost[i] = tpus->NewPrice;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding new item for %s. ItemID %i, SerialNumber %i, Charges %i, Price: %i, Slot %i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding new item for %s. ItemID %i, SerialNumber %i, Charges %i, Price: %i, Slot %i",
|
||||
GetName(), newgis->Items[i], newgis->SerialNumber[i], newgis->Charges[i],
|
||||
tpus->NewPrice, i);
|
||||
}
|
||||
@@ -2249,7 +2249,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
QueuePacket(app);
|
||||
|
||||
if(OldPrice == tpus->NewPrice) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "The new price is the same as the old one.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "The new price is the same as the old one.");
|
||||
safe_delete(gis);
|
||||
return;
|
||||
}
|
||||
@@ -2855,11 +2855,11 @@ void Client::UpdateBuyLine(const EQApplicationPacket *app) {
|
||||
|
||||
bool LoreConflict = CheckLoreConflict(item);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "UpdateBuyLine: Char: %s BuySlot: %i ItemID %i %s Quantity %i Toggle: %i Price %i ItemCount %i LoreConflict %i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "UpdateBuyLine: Char: %s BuySlot: %i ItemID %i %s Quantity %i Toggle: %i Price %i ItemCount %i LoreConflict %i",
|
||||
GetName(), BuySlot, ItemID, item->Name, Quantity, ToggleOnOff, Price, ItemCount, LoreConflict);
|
||||
|
||||
if((item->NoDrop != 0) && !LoreConflict && (Quantity > 0) && HasMoney(Quantity * Price) && ToggleOnOff && (ItemCount == 0)) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding to database");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding to database");
|
||||
database.AddBuyLine(CharacterID(), BuySlot, ItemID, ItemName, Quantity, Price);
|
||||
QueuePacket(app);
|
||||
}
|
||||
|
||||
+17
-17
@@ -140,7 +140,7 @@ void WorldServer::Process() {
|
||||
|
||||
ServerPacket *pack = 0;
|
||||
while((pack = tcpc.PopPacket())) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Got 0x%04x from world:", pack->opcode);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Got 0x%04x from world:", pack->opcode);
|
||||
_hex(ZONE__WORLD_TRACE,pack->pBuffer,pack->size);
|
||||
switch(pack->opcode) {
|
||||
case 0: {
|
||||
@@ -155,12 +155,12 @@ void WorldServer::Process() {
|
||||
if (pack->size != sizeof(ServerConnectInfo))
|
||||
break;
|
||||
ServerConnectInfo* sci = (ServerConnectInfo*) pack->pBuffer;
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World assigned Port: %d for this zone.", sci->port);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World assigned Port: %d for this zone.", sci->port);
|
||||
ZoneConfig::SetZonePort(sci->port);
|
||||
break;
|
||||
}
|
||||
case ServerOP_ZAAuthFailed: {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World server responded 'Not Authorized', disabling reconnect");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World server responded 'Not Authorized', disabling reconnect");
|
||||
pTryReconnect = false;
|
||||
Disconnect();
|
||||
break;
|
||||
@@ -678,7 +678,7 @@ void WorldServer::Process() {
|
||||
//pendingrezexp is the amount of XP on the corpse. Setting it to a value >= 0
|
||||
//also serves to inform Client::OPRezzAnswer to expect a packet.
|
||||
client->SetPendingRezzData(srs->exp, srs->dbid, srs->rez.spellid, srs->rez.corpse_name);
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzRequest in zone %s for %s, spellid:%i",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzRequest in zone %s for %s, spellid:%i",
|
||||
zone->GetShortName(), client->GetName(), srs->rez.spellid);
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RezzRequest,
|
||||
sizeof(Resurrect_Struct));
|
||||
@@ -694,10 +694,10 @@ void WorldServer::Process() {
|
||||
// to the zone that the corpse is in.
|
||||
Corpse* corpse = entity_list.GetCorpseByName(srs->rez.corpse_name);
|
||||
if (corpse && corpse->IsCorpse()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzComplete received in zone %s for corpse %s",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzComplete received in zone %s for corpse %s",
|
||||
zone->GetShortName(), srs->rez.corpse_name);
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
// I don't know why Rezzed is not set to true in CompleteRezz().
|
||||
corpse->IsRezzed(true);
|
||||
corpse->CompleteResurrection();
|
||||
@@ -748,7 +748,7 @@ void WorldServer::Process() {
|
||||
}
|
||||
case ServerOP_SyncWorldTime: {
|
||||
if(zone!=0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Moderate, EQEmuLogSys::Zone_Server, __FUNCTION__ "Received Message SyncWorldTime");
|
||||
logger.DebugCategory(EQEmuLogSys::Moderate, EQEmuLogSys::Zone_Server, __FUNCTION__ "Received Message SyncWorldTime");
|
||||
eqTimeOfDay* newtime = (eqTimeOfDay*) pack->pBuffer;
|
||||
zone->zone_time.setEQTimeOfDay(newtime->start_eqtime, newtime->start_realtime);
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_TimeOfDay, sizeof(TimeOfDay_Struct));
|
||||
@@ -1974,7 +1974,7 @@ bool WorldServer::SendVoiceMacro(Client* From, uint32 Type, char* Target, uint32
|
||||
|
||||
bool WorldServer::RezzPlayer(EQApplicationPacket* rpack, uint32 rezzexp, uint32 dbid, uint16 opcode)
|
||||
{
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "WorldServer::RezzPlayer rezzexp is %i (0 is normal for RezzComplete", rezzexp);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "WorldServer::RezzPlayer rezzexp is %i (0 is normal for RezzComplete", rezzexp);
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_RezzPlayer, sizeof(RezzPlayer_Struct));
|
||||
RezzPlayer_Struct* sem = (RezzPlayer_Struct*) pack->pBuffer;
|
||||
sem->rezzopcode = opcode;
|
||||
@@ -1983,9 +1983,9 @@ bool WorldServer::RezzPlayer(EQApplicationPacket* rpack, uint32 rezzexp, uint32
|
||||
sem->dbid = dbid;
|
||||
bool ret = SendPacket(pack);
|
||||
if (ret)
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Sending player rezz packet to world spellid:%i", sem->rez.spellid);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Sending player rezz packet to world spellid:%i", sem->rez.spellid);
|
||||
else
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "NOT Sending player rezz packet to world");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "NOT Sending player rezz packet to world");
|
||||
|
||||
safe_delete(pack);
|
||||
return ret;
|
||||
@@ -2005,14 +2005,14 @@ void WorldServer::HandleReloadTasks(ServerPacket *pack)
|
||||
{
|
||||
ReloadTasks_Struct* rts = (ReloadTasks_Struct*) pack->pBuffer;
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Zone received ServerOP_ReloadTasks from World, Command %i", rts->Command);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Zone received ServerOP_ReloadTasks from World, Command %i", rts->Command);
|
||||
|
||||
switch(rts->Command) {
|
||||
case RELOADTASKS:
|
||||
entity_list.SaveAllClientsTaskState();
|
||||
|
||||
if(rts->Parameter == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload ALL tasks");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload ALL tasks");
|
||||
safe_delete(taskmanager);
|
||||
taskmanager = new TaskManager;
|
||||
taskmanager->LoadTasks();
|
||||
@@ -2021,7 +2021,7 @@ void WorldServer::HandleReloadTasks(ServerPacket *pack)
|
||||
entity_list.ReloadAllClientsTaskState();
|
||||
}
|
||||
else {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload only task %i", rts->Parameter);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload only task %i", rts->Parameter);
|
||||
taskmanager->LoadTasks(rts->Parameter);
|
||||
entity_list.ReloadAllClientsTaskState(rts->Parameter);
|
||||
}
|
||||
@@ -2030,23 +2030,23 @@ void WorldServer::HandleReloadTasks(ServerPacket *pack)
|
||||
|
||||
case RELOADTASKPROXIMITIES:
|
||||
if(zone) {
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task proximities");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task proximities");
|
||||
taskmanager->LoadProximities(zone->GetZoneID());
|
||||
}
|
||||
break;
|
||||
|
||||
case RELOADTASKGOALLISTS:
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task goal lists");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task goal lists");
|
||||
taskmanager->ReloadGoalLists();
|
||||
break;
|
||||
|
||||
case RELOADTASKSETS:
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task sets");
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task sets");
|
||||
taskmanager->LoadTaskSets();
|
||||
break;
|
||||
|
||||
default:
|
||||
logger.LogDebugType(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Unhandled ServerOP_ReloadTasks command %i", rts->Command);
|
||||
logger.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Unhandled ServerOP_ReloadTasks command %i", rts->Command);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -523,14 +523,14 @@ Trader_Struct* ZoneDatabase::LoadTraderItem(uint32 char_id)
|
||||
std::string query = StringFormat("SELECT * FROM trader WHERE char_id = %i ORDER BY slot_id LIMIT 80", char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Failed to load trader information!\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Failed to load trader information!\n");
|
||||
return loadti;
|
||||
}
|
||||
|
||||
loadti->Code = BazaarTrader_ShowItems;
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
if (atoi(row[5]) >= 80 || atoi(row[4]) < 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad Slot number when trying to load trader information!\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad Slot number when trying to load trader information!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -548,13 +548,13 @@ TraderCharges_Struct* ZoneDatabase::LoadTraderItemWithCharges(uint32 char_id)
|
||||
std::string query = StringFormat("SELECT * FROM trader WHERE char_id=%i ORDER BY slot_id LIMIT 80", char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Failed to load trader information!\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Failed to load trader information!\n");
|
||||
return loadti;
|
||||
}
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
if (atoi(row[5]) >= 80 || atoi(row[5]) < 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad Slot number when trying to load trader information!\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad Slot number when trying to load trader information!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
return nullptr;
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad result from query\n"); fflush(stdout);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad result from query\n"); fflush(stdout);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
const Item_Struct *item = database.GetItem(ItemID);
|
||||
|
||||
if(!item) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item\n");
|
||||
fflush(stdout);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -597,7 +597,7 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
if(!inst) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item instance\n");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item instance\n");
|
||||
fflush(stdout);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -624,7 +624,7 @@ void ZoneDatabase::SaveTraderItem(uint32 CharID, uint32 ItemID, uint32 SerialNum
|
||||
}
|
||||
|
||||
void ZoneDatabase::UpdateTraderItemCharges(int CharID, uint32 SerialNumber, int32 Charges) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderItemCharges(%i, %i, %i)", CharID, SerialNumber, Charges);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderItemCharges(%i, %i, %i)", CharID, SerialNumber, Charges);
|
||||
|
||||
std::string query = StringFormat("UPDATE trader SET charges = %i WHERE char_id = %i AND serialnumber = %i",
|
||||
Charges, CharID, SerialNumber);
|
||||
@@ -637,7 +637,7 @@ void ZoneDatabase::UpdateTraderItemCharges(int CharID, uint32 SerialNumber, int3
|
||||
|
||||
void ZoneDatabase::UpdateTraderItemPrice(int CharID, uint32 ItemID, uint32 Charges, uint32 NewPrice) {
|
||||
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderPrice(%i, %i, %i, %i)", CharID, ItemID, Charges, NewPrice);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderPrice(%i, %i, %i, %i)", CharID, ItemID, Charges, NewPrice);
|
||||
|
||||
const Item_Struct *item = database.GetItem(ItemID);
|
||||
|
||||
@@ -645,7 +645,7 @@ void ZoneDatabase::UpdateTraderItemPrice(int CharID, uint32 ItemID, uint32 Charg
|
||||
return;
|
||||
|
||||
if(NewPrice == 0) {
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Removing Trader items from the DB for CharID %i, ItemID %i", CharID, ItemID);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Removing Trader items from the DB for CharID %i, ItemID %i", CharID, ItemID);
|
||||
|
||||
std::string query = StringFormat("DELETE FROM trader WHERE char_id = %i AND item_id = %i",CharID, ItemID);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
Reference in New Issue
Block a user