mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Renamed DebugCategory to DoLog as the aggregate logging function for simplicity of use and shortened syntax of Log.DoLog
This commit is contained in:
+23
-23
@@ -445,7 +445,7 @@ void Client::HandleAAAction(aaID activate) {
|
||||
break;
|
||||
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown AA nonspell action type %d", caa->action);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown AA nonspell action type %d", caa->action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
PetRecord record;
|
||||
if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
|
||||
Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
|
||||
return;
|
||||
}
|
||||
@@ -528,7 +528,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
const NPCType *npc_type = database.GetNPCType(pet.npc_id);
|
||||
if(npc_type == nullptr) {
|
||||
//log write
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
@@ -625,7 +625,7 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
const NPCType *npc_type = database.GetNPCType(typesid);
|
||||
if(npc_type == nullptr) {
|
||||
//log write
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet type id: %d", typesid);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for swarm pet type id: %d", typesid);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
@@ -951,7 +951,7 @@ void Client::SendAAStats() {
|
||||
|
||||
void Client::BuyAA(AA_Action* action)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Starting to buy AA %d", action->ability);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Starting to buy AA %d", action->ability);
|
||||
|
||||
//find the AA information from the database
|
||||
SendAA_Struct* aa2 = zone->FindAA(action->ability);
|
||||
@@ -963,7 +963,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
a = action->ability - i;
|
||||
if(a <= 0)
|
||||
break;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Could not find AA %d, trying potential parent %d", action->ability, a);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Could not find AA %d, trying potential parent %d", action->ability, a);
|
||||
aa2 = zone->FindAA(a);
|
||||
if(aa2 != nullptr)
|
||||
break;
|
||||
@@ -980,7 +980,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
|
||||
uint32 cur_level = GetAA(aa2->id);
|
||||
if((aa2->id + cur_level) != action->ability) { //got invalid AA
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Unable to find or match AA %d (found %d + lvl %d)", action->ability, aa2->id, cur_level);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Unable to find or match AA %d (found %d + lvl %d)", action->ability, aa2->id, cur_level);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ void Client::BuyAA(AA_Action* action)
|
||||
if (m_pp.aapoints >= real_cost && cur_level < aa2->max_level) {
|
||||
SetAA(aa2->id, cur_level + 1);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Set AA %d to level %d", aa2->id, cur_level + 1);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Set AA %d to level %d", aa2->id, cur_level + 1);
|
||||
|
||||
m_pp.aapoints -= real_cost;
|
||||
|
||||
@@ -1429,10 +1429,10 @@ SendAA_Struct* Zone::FindAA(uint32 id) {
|
||||
}
|
||||
|
||||
void Zone::LoadAAs() {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA information...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA information...");
|
||||
totalAAs = database.CountAAs();
|
||||
if(totalAAs == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AAs!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AAs!");
|
||||
aas = nullptr;
|
||||
return;
|
||||
}
|
||||
@@ -1447,11 +1447,11 @@ void Zone::LoadAAs() {
|
||||
}
|
||||
|
||||
//load AA Effects into aa_effects
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA Effects...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA Effects...");
|
||||
if (database.LoadAAEffects2())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loaded %d AA Effects.", aa_effects.size());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loaded %d AA Effects.", aa_effects.size());
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AA Effects!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AA Effects!");
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadAAEffects2() {
|
||||
@@ -1460,12 +1460,12 @@ bool ZoneDatabase::LoadAAEffects2() {
|
||||
const std::string query = "SELECT aaid, slot, effectid, base1, base2 FROM aa_effects ORDER BY aaid ASC, slot ASC";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!results.RowCount()) { //no results
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading AA Effects, none found in the database.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading AA Effects, none found in the database.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1802,7 +1802,7 @@ bool ZoneDatabase::LoadAAEffects() {
|
||||
"redux_aa, redux_rate, redux_aa2, redux_rate2 FROM aa_actions";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1841,7 +1841,7 @@ uint8 ZoneDatabase::GetTotalAALevels(uint32 skill_id) {
|
||||
std::string query = StringFormat("SELECT count(slot) FROM aa_effects WHERE aaid = %i", skill_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1895,7 +1895,7 @@ uint32 ZoneDatabase::CountAAs(){
|
||||
const std::string query = "SELECT count(title_sid) FROM altadv_vars";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1912,7 +1912,7 @@ uint32 ZoneDatabase::CountAAEffects() {
|
||||
const std::string query = "SELECT count(id) FROM aa_effects";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1945,14 +1945,14 @@ void ZoneDatabase::LoadAAs(SendAA_Struct **load){
|
||||
load[index]->seq = index+1;
|
||||
}
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
AARequiredLevelAndCost.clear();
|
||||
query = "SELECT skill_id, level, cost from aa_required_level_cost order by skill_id";
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1970,7 +1970,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id)
|
||||
std::string query = "SET @row = 0"; //initialize "row" variable in database for next query
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1990,7 +1990,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id)
|
||||
"FROM altadv_vars a WHERE skill_id=%i", skill_id);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Check aggro for %s target %s.", GetName(), mob->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Check aggro for %s target %s.", GetName(), mob->GetName());
|
||||
return( mod_will_aggro(mob, this) );
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Is In zone?:%d\n", mob->InZone());
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Dist^2: %f\n", dist2);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Range^2: %f\n", iAggroRange2);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Faction: %d\n", fv);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Int: %d\n", GetINT());
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Con: %d\n", GetLevelCon(mob->GetLevel()));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Is In zone?:%d\n", mob->InZone());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Dist^2: %f\n", dist2);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Range^2: %f\n", iAggroRange2);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Faction: %d\n", fv);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Int: %d\n", GetINT());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Con: %d\n", GetLevelCon(mob->GetLevel()));
|
||||
|
||||
return(false);
|
||||
}
|
||||
@@ -466,7 +466,7 @@ void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) {
|
||||
//Father Nitwit: make sure we can see them.
|
||||
if(mob->CheckLosFN(sender)) {
|
||||
#if (EQDEBUG>=5)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "AIYellForHelp(\"%s\",\"%s\") %s attacking %s Dist %f Z %f",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "AIYellForHelp(\"%s\",\"%s\") %s attacking %s Dist %f Z %f",
|
||||
sender->GetName(), attacker->GetName(), mob->GetName(), attacker->GetName(), mob->DistNoRoot(*sender), fabs(sender->GetZ()+mob->GetZ()));
|
||||
#endif
|
||||
mob->AddToHateList(attacker, 1, 0, false);
|
||||
@@ -693,7 +693,7 @@ type', in which case, the answer is yes.
|
||||
}
|
||||
while( reverse++ == 0 );
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Mob::IsAttackAllowed: don't have a rule for this - %s vs %s\n", this->GetName(), target->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Mob::IsAttackAllowed: don't have a rule for this - %s vs %s\n", this->GetName(), target->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ bool Mob::IsBeneficialAllowed(Mob *target)
|
||||
}
|
||||
while( reverse++ == 0 );
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Mob::IsBeneficialAllowed: don't have a rule for this - %s to %s\n", this->GetName(), target->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Mob::IsBeneficialAllowed: don't have a rule for this - %s to %s\n", this->GetName(), target->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -945,7 +945,7 @@ bool Mob::CheckLosFN(float posX, float posY, float posZ, float mobSize) {
|
||||
oloc.z = posZ + (mobSize==0.0?LOS_DEFAULT_HEIGHT:mobSize)/2 * SEE_POSITION;
|
||||
|
||||
#if LOSDEBUG>=5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "LOS from (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f) sizes: (%.2f, %.2f)", myloc.x, myloc.y, myloc.z, oloc.x, oloc.y, oloc.z, GetSize(), mobSize);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "LOS from (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f) sizes: (%.2f, %.2f)", myloc.x, myloc.y, myloc.z, oloc.x, oloc.y, oloc.z, GetSize(), mobSize);
|
||||
#endif
|
||||
return zone->zonemap->CheckLoS(myloc, oloc);
|
||||
}
|
||||
|
||||
+87
-87
@@ -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();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Weapon skill : %i", item->ItemType);
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "CheckHitChance(%s) attacked by %s", defender->GetName(), attacker->GetName());
|
||||
Log.DoLog(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
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit before level diff calc %.2f", chancetohit);
|
||||
Log.DoLog(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);
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after level diff calc %.2f", chancetohit);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after level diff calc %.2f", chancetohit);
|
||||
|
||||
chancetohit -= ((float)defender->GetAGI() * RuleR(Combat, AgiHitFactor));
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after Agility calc %.2f", chancetohit);
|
||||
Log.DoLog(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)));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after agil calc %.2f", "Chance to hit after weapon falloff calc (attack) %.2f", chancetohit);
|
||||
Log.DoLog(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)));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit after weapon falloff calc (defense) %.2f", chancetohit);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Applied spell melee skill bonus %d, yeilding %.2f", attacker->spellbonuses.MeleeSkillCheck, chancetohit);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Applied item melee skill bonus %d, yeilding %.2f", attacker->spellbonuses.MeleeSkillCheck, chancetohit);
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Chance to hit %.2f after accuracy calc %.2f and avoidance calc %.2f", chancetohit, hitBonus, avoidanceBonus);
|
||||
Log.DoLog(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
|
||||
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "3 FINAL calculated chance to hit is: %5.2f", chancetohit);
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll);
|
||||
|
||||
return(tohit_roll <= chancetohit);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ bool Mob::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
|
||||
/////////////////////////////////////////////////////////
|
||||
if (IsEnraged() && other->InFrontMob(this, other->GetX(), other->GetY())) {
|
||||
damage = -3;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am enraged, riposting frontal attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am enraged, riposting frontal attack.");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
@@ -517,7 +517,7 @@ bool Mob::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all avoidances: %d", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all avoidances: %d", damage);
|
||||
|
||||
if (damage < 0)
|
||||
return true;
|
||||
@@ -690,9 +690,9 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
||||
damage -= (myac * zone->random.Int(0, acrandom) / 10000);
|
||||
}
|
||||
if (damage<1) damage=1;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "AC Damage Reduction: fail chance %d%%. Failed. Reduction %.3f%%, random %d. Resulting damage %d.", acfail, acreduction, acrandom, damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "AC Damage Reduction: fail chance %d%%. Failed. Reduction %.3f%%, random %d. Resulting damage %d.", acfail, acreduction, acrandom, damage);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "AC Damage Reduction: fail chance %d%%. Did not fail.", acfail);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "AC Damage Reduction: fail chance %d%%. Did not fail.", acfail);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1128,14 +1128,14 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
{
|
||||
if (!other) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!GetTarget())
|
||||
SetTarget(other);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking %s with hand %d %s", other?other->GetName():"(nullptr)", Hand, bRiposte?"(this is a riposte)":"");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking %s with hand %d %s", other?other->GetName():"(nullptr)", Hand, bRiposte?"(this is a riposte)":"");
|
||||
|
||||
//SetAttackTimer();
|
||||
if (
|
||||
@@ -1145,12 +1145,12 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
|| (GetHP() < 0)
|
||||
|| (!IsAttackAllowed(other))
|
||||
) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, invalid circumstances.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, invalid circumstances.");
|
||||
return false; // Only bards can attack while casting
|
||||
}
|
||||
|
||||
if(DivineAura() && !GetGM()) {//cant attack while invulnerable unless your a gm
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Divine Aura is in effect.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Divine Aura is in effect.");
|
||||
Message_StringID(MT_DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
|
||||
return false;
|
||||
}
|
||||
@@ -1170,19 +1170,19 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||
return(false);
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with weapon: %s (%d)", weapon->GetItem()->Name, weapon->GetID());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with weapon: %s (%d)", weapon->GetItem()->Name, weapon->GetID());
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking without a weapon.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking without a weapon.");
|
||||
}
|
||||
|
||||
// calculate attack_skill and skillinuse depending on hand and weapon
|
||||
// also send Packet to near clients
|
||||
SkillUseTypes skillinuse;
|
||||
AttackAnimation(skillinuse, Hand, weapon);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with %s in slot %d using skill %d", weapon?weapon->GetItem()->Name:"Fist", Hand, skillinuse);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with %s in slot %d using skill %d", weapon?weapon->GetItem()->Name:"Fist", Hand, skillinuse);
|
||||
|
||||
/// Now figure out damage
|
||||
int damage = 0;
|
||||
@@ -1200,7 +1200,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
if(IsBerserk() && GetClass() == BERSERKER){
|
||||
int bonus = 3 + GetLevel()/10; //unverified
|
||||
weapon_damage = weapon_damage * (100+bonus) / 100;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Berserker damage bonus increases DMG to %d", weapon_damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Berserker damage bonus increases DMG to %d", weapon_damage);
|
||||
}
|
||||
|
||||
//try a finishing blow.. if successful end the attack
|
||||
@@ -1268,7 +1268,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
|
||||
damage = mod_client_damage(damage, skillinuse, Hand, weapon, other);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage calculated to %d (min %d, max %d, str %d, skill %d, DMG %d, lv %d)",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage calculated to %d (min %d, max %d, str %d, skill %d, DMG %d, lv %d)",
|
||||
damage, min_hit, max_hit, GetSTR(), GetSkill(skillinuse), weapon_damage, mylevel);
|
||||
|
||||
int hit_chance_bonus = 0;
|
||||
@@ -1283,7 +1283,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
|
||||
//check to see if we hit..
|
||||
if(!other->CheckHitChance(this, skillinuse, Hand, hit_chance_bonus)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack missed. Damage set to 0.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack missed. Damage set to 0.");
|
||||
damage = 0;
|
||||
} else { //we hit, try to avoid it
|
||||
other->AvoidDamage(this, damage);
|
||||
@@ -1291,7 +1291,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
if(damage > 0)
|
||||
CommonOutgoingHitSuccess(other, damage, skillinuse);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all reductions: %d", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all reductions: %d", damage);
|
||||
}
|
||||
|
||||
//riposte
|
||||
@@ -1430,7 +1430,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes att
|
||||
}
|
||||
|
||||
int exploss = 0;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob ? killerMob->GetName() : "Unknown", damage, spell, attack_skill);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob ? killerMob->GetName() : "Unknown", damage, spell, attack_skill);
|
||||
|
||||
/*
|
||||
#1: Send death packet to everyone
|
||||
@@ -1692,7 +1692,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
|
||||
if (!other) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to NPC::Attack() for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to NPC::Attack() for evaluation!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1710,7 +1710,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
if (other->IsClient())
|
||||
other->CastToClient()->RemoveXTarget(this, false);
|
||||
RemoveFromHateList(other);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am not allowed to attack %s", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am not allowed to attack %s", other->GetName());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1737,10 +1737,10 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
//We dont factor much from the weapon into the attack.
|
||||
//Just the skill type so it doesn't look silly using punching animations and stuff while wielding weapons
|
||||
if(weapon) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with weapon: %s (%d) (too bad im not using it for much)", weapon->Name, weapon->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with weapon: %s (%d) (too bad im not using it for much)", weapon->Name, weapon->ID);
|
||||
|
||||
if(Hand == MainSecondary && weapon->ItemType == ItemTypeShield){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack with shield canceled.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack with shield canceled.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1829,11 +1829,11 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
|
||||
//check if we're hitting above our max or below it.
|
||||
if((min_dmg+eleBane) != 0 && damage < (min_dmg+eleBane)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage (%d) is below min (%d). Setting to min.", damage, (min_dmg+eleBane));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage (%d) is below min (%d). Setting to min.", damage, (min_dmg+eleBane));
|
||||
damage = (min_dmg+eleBane);
|
||||
}
|
||||
if((max_dmg+eleBane) != 0 && damage > (max_dmg+eleBane)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage (%d) is above max (%d). Setting to max.", damage, (max_dmg+eleBane));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage (%d) is above max (%d). Setting to max.", damage, (max_dmg+eleBane));
|
||||
damage = (max_dmg+eleBane);
|
||||
}
|
||||
|
||||
@@ -1846,7 +1846,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
}
|
||||
|
||||
if(other->IsClient() && other->CastToClient()->IsSitting()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Client %s is sitting. Hitting for max damage (%d).", other->GetName(), (max_dmg+eleBane));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Client %s is sitting. Hitting for max damage (%d).", other->GetName(), (max_dmg+eleBane));
|
||||
damage = (max_dmg+eleBane);
|
||||
damage += (itembonuses.HeroicSTR / 10) + (damage * other->GetSkillDmgTaken(skillinuse) / 100) + GetSkillDmgAmt(skillinuse);
|
||||
|
||||
@@ -1857,7 +1857,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
hate += opts->hate_flat;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Generating hate %d towards %s", hate, GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Generating hate %d towards %s", hate, GetName());
|
||||
// now add done damage to the hate list
|
||||
other->AddToHateList(this, hate);
|
||||
|
||||
@@ -1881,7 +1881,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
if(damage > 0) {
|
||||
CommonOutgoingHitSuccess(other, damage, skillinuse);
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Generating hate %d towards %s", hate, GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Generating hate %d towards %s", hate, GetName());
|
||||
// now add done damage to the hate list
|
||||
if(damage > 0)
|
||||
other->AddToHateList(this, hate);
|
||||
@@ -1890,7 +1890,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage against %s: %d", other->GetName(), damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage against %s: %d", other->GetName(), damage);
|
||||
|
||||
if(other->IsClient() && IsPet() && GetOwner()->IsClient()) {
|
||||
//pets do half damage to clients in pvp
|
||||
@@ -1902,7 +1902,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
|
||||
//cant riposte a riposte
|
||||
if (bRiposte && damage == -3) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Riposte of riposte canceled.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Riposte of riposte canceled.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1954,7 +1954,7 @@ void NPC::Damage(Mob* other, int32 damage, uint16 spell_id, SkillUseTypes attack
|
||||
//handle EVENT_ATTACK. Resets after we have not been attacked for 12 seconds
|
||||
if(attacked_timer.Check())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Triggering EVENT_ATTACK due to attack by %s", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Triggering EVENT_ATTACK due to attack by %s", other->GetName());
|
||||
parse->EventNPC(EVENT_ATTACK, this, other, "", 0);
|
||||
}
|
||||
attacked_timer.Start(CombatEventTimer_expire);
|
||||
@@ -1991,7 +1991,7 @@ void NPC::Damage(Mob* other, int32 damage, uint16 spell_id, SkillUseTypes attack
|
||||
}
|
||||
|
||||
bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack_skill) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob->GetName(), damage, spell, attack_skill);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob->GetName(), damage, spell, attack_skill);
|
||||
|
||||
Mob *oos = nullptr;
|
||||
if(killerMob) {
|
||||
@@ -2028,7 +2028,7 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack
|
||||
if (IsEngaged())
|
||||
{
|
||||
zone->DelAggroMob();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "%s Mobs currently Aggro %i", __FUNCTION__, zone->MobsAggroCount());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "%s Mobs currently Aggro %i", __FUNCTION__, zone->MobsAggroCount());
|
||||
}
|
||||
SetHP(0);
|
||||
SetPet(0);
|
||||
@@ -2580,7 +2580,7 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
||||
if(DS == 0 && rev_ds == 0)
|
||||
return;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying Damage Shield of value %d to %s", DS, attacker->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying Damage Shield of value %d to %s", DS, attacker->GetName());
|
||||
|
||||
//invert DS... spells yield negative values for a true damage shield
|
||||
if(DS < 0) {
|
||||
@@ -2625,7 +2625,7 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
||||
rev_ds_spell_id = spellbonuses.ReverseDamageShieldSpellID;
|
||||
|
||||
if(rev_ds < 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying Reverse Damage Shield of value %d to %s", rev_ds, attacker->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying Reverse Damage Shield of value %d to %s", rev_ds, attacker->GetName());
|
||||
attacker->Damage(this, -rev_ds, rev_ds_spell_id, SkillAbjuration/*hackish*/, false); //"this" (us) will get the hate, etc. not sure how this works on Live, but it'll works for now, and tanks will love us for this
|
||||
//do we need to send a damage packet here also?
|
||||
}
|
||||
@@ -3137,7 +3137,7 @@ int32 Mob::ReduceDamage(int32 damage)
|
||||
int damage_to_reduce = damage * spellbonuses.MeleeThresholdGuard[0] / 100;
|
||||
if(damage_to_reduce >= buffs[slot].melee_rune)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MeleeThresholdGuard %d damage negated, %d"
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MeleeThresholdGuard %d damage negated, %d"
|
||||
" damage remaining, fading buff.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
damage -= buffs[slot].melee_rune;
|
||||
if(!TryFadeEffect(slot))
|
||||
@@ -3145,7 +3145,7 @@ int32 Mob::ReduceDamage(int32 damage)
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MeleeThresholdGuard %d damage negated, %d"
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MeleeThresholdGuard %d damage negated, %d"
|
||||
" damage remaining.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
buffs[slot].melee_rune = (buffs[slot].melee_rune - damage_to_reduce);
|
||||
damage -= damage_to_reduce;
|
||||
@@ -3164,7 +3164,7 @@ int32 Mob::ReduceDamage(int32 damage)
|
||||
|
||||
if(spellbonuses.MitigateMeleeRune[3] && (damage_to_reduce >= buffs[slot].melee_rune))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
" damage remaining, fading buff.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
damage -= buffs[slot].melee_rune;
|
||||
if(!TryFadeEffect(slot))
|
||||
@@ -3172,7 +3172,7 @@ int32 Mob::ReduceDamage(int32 damage)
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
" damage remaining.", damage_to_reduce, buffs[slot].melee_rune);
|
||||
|
||||
if (spellbonuses.MitigateMeleeRune[3])
|
||||
@@ -3290,7 +3290,7 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
|
||||
|
||||
if(spellbonuses.MitigateSpellRune[3] && (damage_to_reduce >= buffs[slot].magic_rune))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateSpellDamage %d damage negated, %d"
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateSpellDamage %d damage negated, %d"
|
||||
" damage remaining, fading buff.", damage_to_reduce, buffs[slot].magic_rune);
|
||||
damage -= buffs[slot].magic_rune;
|
||||
if(!TryFadeEffect(slot))
|
||||
@@ -3298,7 +3298,7 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Mob::ReduceDamage SE_MitigateMeleeDamage %d damage negated, %d"
|
||||
" damage remaining.", damage_to_reduce, buffs[slot].magic_rune);
|
||||
|
||||
if (spellbonuses.MitigateSpellRune[3])
|
||||
@@ -3437,11 +3437,11 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
// This method is called with skill_used=ABJURE for Damage Shield damage.
|
||||
bool FromDamageShield = (skill_used == SkillAbjuration);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying damage %d done by %s with skill %d and spell %d, avoidable? %s, is %sa buff tic in slot %d",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying damage %d done by %s with skill %d and spell %d, avoidable? %s, is %sa buff tic in slot %d",
|
||||
damage, attacker?attacker->GetName():"NOBODY", skill_used, spell_id, avoidable?"yes":"no", iBuffTic?"":"not ", buffslot);
|
||||
|
||||
if (GetInvul() || DivineAura()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Avoiding %d damage due to invulnerability.", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Avoiding %d damage due to invulnerability.", damage);
|
||||
damage = -5;
|
||||
}
|
||||
|
||||
@@ -3493,7 +3493,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
int healed = damage;
|
||||
|
||||
healed = attacker->GetActSpellHealing(spell_id, healed);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying lifetap heal of %d to %s", healed, attacker->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying lifetap heal of %d to %s", healed, attacker->GetName());
|
||||
attacker->HealDamage(healed);
|
||||
|
||||
//we used to do a message to the client, but its gone now.
|
||||
@@ -3506,7 +3506,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
if (pet && !pet->IsFamiliar() && !pet->GetSpecialAbility(IMMUNE_AGGRO) && !pet->IsEngaged() && attacker && attacker != this && !attacker->IsCorpse())
|
||||
{
|
||||
if (!pet->IsHeld()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Sending pet %s into battle due to attack.", pet->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Aggro, "Sending pet %s into battle due to attack.", pet->GetName());
|
||||
pet->AddToHateList(attacker, 1);
|
||||
pet->SetTarget(attacker);
|
||||
Message_StringID(10, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
|
||||
@@ -3516,7 +3516,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
//see if any runes want to reduce this damage
|
||||
if(spell_id == SPELL_UNKNOWN) {
|
||||
damage = ReduceDamage(damage);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Melee Damage reduced to %d", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Melee Damage reduced to %d", damage);
|
||||
damage = ReduceAllDamage(damage);
|
||||
TryTriggerThreshHold(damage, SE_TriggerMeleeThreshold, attacker);
|
||||
} else {
|
||||
@@ -3573,7 +3573,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
|
||||
//fade mez if we are mezzed
|
||||
if (IsMezzed() && attacker) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Breaking mez due to attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Breaking mez due to attack.");
|
||||
entity_list.MessageClose_StringID(this, true, 100, MT_WornOff,
|
||||
HAS_BEEN_AWAKENED, GetCleanName(), attacker->GetCleanName());
|
||||
BuffFadeByEffect(SE_Mez);
|
||||
@@ -3616,7 +3616,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
int stun_resist = itembonuses.StunResist + spellbonuses.StunResist;
|
||||
int frontal_stun_resist = itembonuses.FrontalStunResist + spellbonuses.FrontalStunResist;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun passed, checking resists. Was %d chance.", stun_chance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun passed, checking resists. Was %d chance.", stun_chance);
|
||||
if (IsClient()) {
|
||||
stun_resist += aabonuses.StunResist;
|
||||
frontal_stun_resist += aabonuses.FrontalStunResist;
|
||||
@@ -3626,20 +3626,20 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
if (((GetBaseRace() == OGRE && IsClient()) ||
|
||||
(frontal_stun_resist && zone->random.Roll(frontal_stun_resist))) &&
|
||||
!attacker->BehindMob(this, attacker->GetX(), attacker->GetY())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Frontal stun resisted. %d chance.", frontal_stun_resist);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Frontal stun resisted. %d chance.", frontal_stun_resist);
|
||||
} else {
|
||||
// Normal stun resist check.
|
||||
if (stun_resist && zone->random.Roll(stun_resist)) {
|
||||
if (IsClient())
|
||||
Message_StringID(MT_Stun, SHAKE_OFF_STUN);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun Resisted. %d chance.", stun_resist);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun Resisted. %d chance.", stun_resist);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stunned. %d resist chance.", stun_resist);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stunned. %d resist chance.", stun_resist);
|
||||
Stun(zone->random.Int(0, 2) * 1000); // 0-2 seconds
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun failed. %d chance.", stun_chance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun failed. %d chance.", stun_chance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3653,7 +3653,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
//increment chances of interrupting
|
||||
if(IsCasting()) { //shouldnt interrupt on regular spell damage
|
||||
attacked_count++;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Melee attack while casting. Attack count %d", attacked_count);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Melee attack while casting. Attack count %d", attacked_count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3859,7 +3859,7 @@ float Mob::GetProcChances(float ProcBonus, uint16 hand)
|
||||
ProcChance += ProcChance * ProcBonus / 100.0f;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
|
||||
return ProcChance;
|
||||
}
|
||||
|
||||
@@ -3878,7 +3878,7 @@ float Mob::GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 h
|
||||
ProcBonus += static_cast<float>(myagi) * RuleR(Combat, DefProcPerMinAgiContrib) / 100.0f;
|
||||
ProcChance = ProcChance + (ProcChance * ProcBonus);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Defensive Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Defensive Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
|
||||
return ProcChance;
|
||||
}
|
||||
|
||||
@@ -3887,7 +3887,7 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand) {
|
||||
|
||||
if (!on) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryDefensiveProc for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryDefensiveProc for evaluation!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3918,17 +3918,17 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand) {
|
||||
void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
||||
if(!on) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsAttackAllowed(on)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preventing procing off of unattackable things.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preventing procing off of unattackable things.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DivineAura()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Procs canceled, Divine Aura is in effect.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Procs canceled, Divine Aura is in effect.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3975,7 +3975,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on
|
||||
static_cast<float>(weapon->ProcRate)) / 100.0f;
|
||||
if (zone->random.Roll(WPC)) { // 255 dex = 0.084 chance of proc. No idea what this number should be really.
|
||||
if (weapon->Proc.Level > ourlevel) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Tried to proc (%s), but our level (%d) is lower than required (%d)",
|
||||
weapon->Name, ourlevel, weapon->Proc.Level);
|
||||
if (IsPet()) {
|
||||
@@ -3986,7 +3986,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on
|
||||
Message_StringID(13, PROC_TOOLOW);
|
||||
}
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Attacking weapon (%s) successfully procing spell %d (%.2f percent chance)",
|
||||
weapon->Name, weapon->Proc.Effect, WPC * 100);
|
||||
ExecWeaponProc(inst, weapon->Proc.Effect, on);
|
||||
@@ -4065,12 +4065,12 @@ void Mob::TrySpellProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on,
|
||||
// Perma procs (AAs)
|
||||
if (PermaProcs[i].spellID != SPELL_UNKNOWN) {
|
||||
if (zone->random.Roll(PermaProcs[i].chance)) { // TODO: Do these get spell bonus?
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Permanent proc %d procing spell %d (%d percent chance)",
|
||||
i, PermaProcs[i].spellID, PermaProcs[i].chance);
|
||||
ExecWeaponProc(nullptr, PermaProcs[i].spellID, on);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Permanent proc %d failed to proc %d (%d percent chance)",
|
||||
i, PermaProcs[i].spellID, PermaProcs[i].chance);
|
||||
}
|
||||
@@ -4080,13 +4080,13 @@ void Mob::TrySpellProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on,
|
||||
if (SpellProcs[i].spellID != SPELL_UNKNOWN) {
|
||||
float chance = ProcChance * (static_cast<float>(SpellProcs[i].chance) / 100.0f);
|
||||
if (zone->random.Roll(chance)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Spell proc %d procing spell %d (%.2f percent chance)",
|
||||
i, SpellProcs[i].spellID, chance);
|
||||
ExecWeaponProc(nullptr, SpellProcs[i].spellID, on);
|
||||
CheckNumHitsRemaining(NUMHIT_OffensiveSpellProcs, 0, SpellProcs[i].base_spellID);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Spell proc %d failed to proc %d (%.2f percent chance)",
|
||||
i, SpellProcs[i].spellID, chance);
|
||||
}
|
||||
@@ -4096,13 +4096,13 @@ void Mob::TrySpellProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on,
|
||||
if (RangedProcs[i].spellID != SPELL_UNKNOWN) {
|
||||
float chance = ProcChance * (static_cast<float>(RangedProcs[i].chance) / 100.0f);
|
||||
if (zone->random.Roll(chance)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Ranged proc %d procing spell %d (%.2f percent chance)",
|
||||
i, RangedProcs[i].spellID, chance);
|
||||
ExecWeaponProc(nullptr, RangedProcs[i].spellID, on);
|
||||
CheckNumHitsRemaining(NUMHIT_OffensiveSpellProcs, 0, RangedProcs[i].base_spellID);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat,
|
||||
"Ranged proc %d failed to proc %d (%.2f percent chance)",
|
||||
i, RangedProcs[i].spellID, chance);
|
||||
}
|
||||
@@ -4352,7 +4352,7 @@ bool Mob::TryFinishingBlow(Mob *defender, SkillUseTypes skillinuse)
|
||||
}
|
||||
|
||||
void Mob::DoRiposte(Mob* defender) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a riposte");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a riposte");
|
||||
|
||||
if (!defender)
|
||||
return;
|
||||
@@ -4370,7 +4370,7 @@ void Mob::DoRiposte(Mob* defender) {
|
||||
|
||||
//Live AA - Double Riposte
|
||||
if(DoubleRipChance && zone->random.Roll(DoubleRipChance)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a double riposed (%d percent chance)", DoubleRipChance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a double riposed (%d percent chance)", DoubleRipChance);
|
||||
defender->Attack(this, MainPrimary, true);
|
||||
if (HasDied()) return;
|
||||
}
|
||||
@@ -4381,7 +4381,7 @@ void Mob::DoRiposte(Mob* defender) {
|
||||
DoubleRipChance = defender->aabonuses.GiveDoubleRiposte[1];
|
||||
|
||||
if(DoubleRipChance && zone->random.Roll(DoubleRipChance)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a return SPECIAL ATTACK (%d percent chance)", DoubleRipChance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a return SPECIAL ATTACK (%d percent chance)", DoubleRipChance);
|
||||
|
||||
if (defender->GetClass() == MONK)
|
||||
defender->MonkSpecialAttack(this, defender->aabonuses.GiveDoubleRiposte[2]);
|
||||
@@ -4398,7 +4398,7 @@ void Mob::ApplyMeleeDamageBonus(uint16 skill, int32 &damage){
|
||||
int dmgbonusmod = 0;
|
||||
dmgbonusmod += (100*(itembonuses.STR + spellbonuses.STR))/3;
|
||||
dmgbonusmod += (100*(spellbonuses.ATK + itembonuses.ATK))/5;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage bonus: %d percent from ATK and STR bonuses.", (dmgbonusmod/100));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage bonus: %d percent from ATK and STR bonuses.", (dmgbonusmod/100));
|
||||
damage += (damage*dmgbonusmod/10000);
|
||||
}
|
||||
}
|
||||
@@ -4467,7 +4467,7 @@ void Mob::TrySkillProc(Mob *on, uint16 skill, uint16 ReuseTime, bool Success, ui
|
||||
|
||||
if (!on) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TrySkillProc for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TrySkillProc for evaluation!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4692,13 +4692,13 @@ bool Mob::TryRootFadeByDamage(int buffslot, Mob* attacker) {
|
||||
|
||||
if (!TryFadeEffect(spellbonuses.Root[1])) {
|
||||
BuffFadeBySlot(spellbonuses.Root[1]);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Spell broke root! BreakChance percent chance");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Spell broke root! BreakChance percent chance");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Spell did not break root. BreakChance percent chance");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Spell did not break root. BreakChance percent chance");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4770,19 +4770,19 @@ void Mob::CommonBreakInvisible()
|
||||
{
|
||||
//break invis when you attack
|
||||
if(invisible) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility due to melee attack.");
|
||||
BuffFadeByEffect(SE_Invisibility);
|
||||
BuffFadeByEffect(SE_Invisibility2);
|
||||
invisible = false;
|
||||
}
|
||||
if(invisible_undead) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. undead due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. undead due to melee attack.");
|
||||
BuffFadeByEffect(SE_InvisVsUndead);
|
||||
BuffFadeByEffect(SE_InvisVsUndead2);
|
||||
invisible_undead = false;
|
||||
}
|
||||
if(invisible_animals){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. animals due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. animals due to melee attack.");
|
||||
BuffFadeByEffect(SE_InvisVsAnimals);
|
||||
invisible_animals = false;
|
||||
}
|
||||
|
||||
+3
-3
@@ -77,9 +77,9 @@ void Client::CalcBonuses()
|
||||
|
||||
CalcSpellBonuses(&spellbonuses);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
CalcAABonuses(&aabonuses); //we're not quite ready for this
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AA, "Finished calculating AA Bonuses for %s.", this->GetCleanName());
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.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());
|
||||
Log.DoLog(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)
|
||||
|
||||
+57
-57
@@ -1225,7 +1225,7 @@ int32 Bot::acmod()
|
||||
return (65 + ((agility-300) / 21));
|
||||
}
|
||||
#if EQDEBUG >= 11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::acmod(): Agility: %i, Level: %i",agility,level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::acmod(): Agility: %i, Level: %i",agility,level);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -1462,7 +1462,7 @@ void Bot::LoadAAs() {
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadAAs()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadAAs()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Log.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());
|
||||
Log.DoLog(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)
|
||||
@@ -2774,7 +2774,7 @@ void Bot::LoadStance() {
|
||||
std::string query = StringFormat("SELECT StanceID FROM botstances WHERE BotID = %u;", GetBotID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success() || results.RowCount() == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadStance()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadStance()");
|
||||
SetDefaultBotStance();
|
||||
return;
|
||||
}
|
||||
@@ -2792,7 +2792,7 @@ void Bot::SaveStance() {
|
||||
"VALUES(%u, %u);", GetBotID(), GetBotStance());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::SaveStance()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::SaveStance()");
|
||||
|
||||
}
|
||||
|
||||
@@ -2807,7 +2807,7 @@ void Bot::LoadTimers() {
|
||||
GetBotID(), DisciplineReuseStart-1, DisciplineReuseStart-1, GetClass(), GetLevel());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadTimers()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadTimers()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2847,7 +2847,7 @@ void Bot::SaveTimers() {
|
||||
}
|
||||
|
||||
if(hadError)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::SaveTimers()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::SaveTimers()");
|
||||
|
||||
}
|
||||
|
||||
@@ -2979,7 +2979,7 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
//make sure the attack and ranged timers are up
|
||||
//if the ranged timer is disabled, then they have no ranged weapon and shouldent be attacking anyhow
|
||||
if((attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Bot Archery attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Bot Archery attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
return;
|
||||
}
|
||||
@@ -2997,7 +2997,7 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
if(!RangeWeapon || !Ammo)
|
||||
return;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Shooting %s with bow %s (%d) and arrow %s (%d)", other->GetCleanName(), RangeWeapon->Name, RangeWeapon->ID, Ammo->Name, Ammo->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Shooting %s with bow %s (%d) and arrow %s (%d)", other->GetCleanName(), RangeWeapon->Name, RangeWeapon->ID, Ammo->Name, Ammo->ID);
|
||||
|
||||
if(!IsAttackAllowed(other) ||
|
||||
IsCasting() ||
|
||||
@@ -3015,19 +3015,19 @@ void Bot::BotRangedAttack(Mob* other) {
|
||||
|
||||
//break invis when you attack
|
||||
if(invisible) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility due to melee attack.");
|
||||
BuffFadeByEffect(SE_Invisibility);
|
||||
BuffFadeByEffect(SE_Invisibility2);
|
||||
invisible = false;
|
||||
}
|
||||
if(invisible_undead) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. undead due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. undead due to melee attack.");
|
||||
BuffFadeByEffect(SE_InvisVsUndead);
|
||||
BuffFadeByEffect(SE_InvisVsUndead2);
|
||||
invisible_undead = false;
|
||||
}
|
||||
if(invisible_animals){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. animals due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. animals due to melee attack.");
|
||||
BuffFadeByEffect(SE_InvisVsAnimals);
|
||||
invisible_animals = false;
|
||||
}
|
||||
@@ -3362,7 +3362,7 @@ void Bot::AI_Process() {
|
||||
else if(!IsRooted()) {
|
||||
if(GetTarget() && GetTarget()->GetHateTop() && GetTarget()->GetHateTop() != this)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Returning to location prior to being summoned.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Returning to location prior to being summoned.");
|
||||
CalculateNewPosition2(GetPreSummonX(), GetPreSummonY(), GetPreSummonZ(), GetRunspeed());
|
||||
SetHeading(CalculateHeadingToTarget(GetPreSummonX(), GetPreSummonY()));
|
||||
return;
|
||||
@@ -3689,7 +3689,7 @@ void Bot::AI_Process() {
|
||||
|
||||
if (AImovement_timer->Check()) {
|
||||
if(!IsRooted()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName());
|
||||
CalculateNewPosition2(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed());
|
||||
return;
|
||||
}
|
||||
@@ -3972,7 +3972,7 @@ void Bot::PetAIProcess() {
|
||||
{
|
||||
botPet->SetRunAnimSpeed(0);
|
||||
if(!botPet->IsRooted()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", botPet->GetTarget()->GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", botPet->GetTarget()->GetCleanName());
|
||||
botPet->CalculateNewPosition2(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetOwner()->GetRunspeed());
|
||||
return;
|
||||
}
|
||||
@@ -4211,7 +4211,7 @@ void Bot::GetBotItems(std::string* errorMessage, Inventory &inv) {
|
||||
|
||||
ItemInst* inst = database.CreateItem(item_id, charges, aug[0], aug[1], aug[2], aug[3], aug[4]);
|
||||
if (!inst) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: botid %i has an invalid item_id %i in inventory slot %i", this->GetBotID(), item_id, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: botid %i has an invalid item_id %i in inventory slot %i", this->GetBotID(), item_id, slot_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4235,7 +4235,7 @@ void Bot::GetBotItems(std::string* errorMessage, Inventory &inv) {
|
||||
|
||||
// Save ptr to item in inventory
|
||||
if (put_slot_id == INVALID_INDEX)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: botid=%i, item_id=%i, slot_id=%i",this->GetBotID(), item_id, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: botid=%i, item_id=%i, slot_id=%i",this->GetBotID(), item_id, slot_id);
|
||||
|
||||
}
|
||||
|
||||
@@ -5959,7 +5959,7 @@ void Bot::Damage(Mob *from, int32 damage, uint16 spell_id, SkillUseTypes attack_
|
||||
|
||||
//handle EVENT_ATTACK. Resets after we have not been attacked for 12 seconds
|
||||
if(attacked_timer.Check()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Triggering EVENT_ATTACK due to attack by %s", from->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Triggering EVENT_ATTACK due to attack by %s", from->GetName());
|
||||
parse->EventNPC(EVENT_ATTACK, this, from, "", 0);
|
||||
}
|
||||
|
||||
@@ -5972,7 +5972,7 @@ void Bot::Damage(Mob *from, int32 damage, uint16 spell_id, SkillUseTypes attack_
|
||||
// if spell is lifetap add hp to the caster
|
||||
if (spell_id != SPELL_UNKNOWN && IsLifetapSpell(spell_id)) {
|
||||
int healed = GetActSpellHealing(spell_id, damage);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying lifetap heal of %d to %s", healed, GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Applying lifetap heal of %d to %s", healed, GetCleanName());
|
||||
HealDamage(healed);
|
||||
entity_list.MessageClose(this, true, 300, MT_Spells, "%s beams a smile at %s", GetCleanName(), from->GetCleanName() );
|
||||
}
|
||||
@@ -6017,14 +6017,14 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
{
|
||||
if (!other) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!GetTarget() || GetTarget() != other)
|
||||
SetTarget(other);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking %s with hand %d %s", other?other->GetCleanName():"(nullptr)", Hand, FromRiposte?"(this is a riposte)":"");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking %s with hand %d %s", other?other->GetCleanName():"(nullptr)", Hand, FromRiposte?"(this is a riposte)":"");
|
||||
|
||||
if ((IsCasting() && (GetClass() != BARD) && !IsFromSpell) ||
|
||||
other == nullptr ||
|
||||
@@ -6036,13 +6036,13 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
entity_list.MessageClose(this, 1, 200, 10, "%s says, '%s is not a legal target master.'", this->GetCleanName(), this->GetTarget()->GetCleanName());
|
||||
if(other) {
|
||||
RemoveFromHateList(other);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am not allowed to attack %s", other->GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am not allowed to attack %s", other->GetCleanName());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(DivineAura()) {//cant attack while invulnerable
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Divine Aura is in effect.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Divine Aura is in effect.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6068,19 +6068,19 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
|
||||
if(weapon != nullptr) {
|
||||
if (!weapon->IsWeapon()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack canceled, Item %s (%d) is not a weapon.", weapon->GetItem()->Name, weapon->GetID());
|
||||
return(false);
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with weapon: %s (%d)", weapon->GetItem()->Name, weapon->GetID());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with weapon: %s (%d)", weapon->GetItem()->Name, weapon->GetID());
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking without a weapon.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking without a weapon.");
|
||||
}
|
||||
|
||||
// calculate attack_skill and skillinuse depending on hand and weapon
|
||||
// also send Packet to near clients
|
||||
SkillUseTypes skillinuse;
|
||||
AttackAnimation(skillinuse, Hand, weapon);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with %s in slot %d using skill %d", weapon?weapon->GetItem()->Name:"Fist", Hand, skillinuse);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attacking with %s in slot %d using skill %d", weapon?weapon->GetItem()->Name:"Fist", Hand, skillinuse);
|
||||
|
||||
/// Now figure out damage
|
||||
int damage = 0;
|
||||
@@ -6098,7 +6098,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
if(berserk && (GetClass() == BERSERKER)){
|
||||
int bonus = 3 + GetLevel()/10; //unverified
|
||||
weapon_damage = weapon_damage * (100+bonus) / 100;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Berserker damage bonus increases DMG to %d", weapon_damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Berserker damage bonus increases DMG to %d", weapon_damage);
|
||||
}
|
||||
|
||||
//try a finishing blow.. if successful end the attack
|
||||
@@ -6163,7 +6163,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
else
|
||||
damage = zone->random.Int(min_hit, max_hit);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage calculated to %d (min %d, max %d, str %d, skill %d, DMG %d, lv %d)",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Damage calculated to %d (min %d, max %d, str %d, skill %d, DMG %d, lv %d)",
|
||||
damage, min_hit, max_hit, GetSTR(), GetSkill(skillinuse), weapon_damage, GetLevel());
|
||||
|
||||
if(opts) {
|
||||
@@ -6175,7 +6175,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
|
||||
//check to see if we hit..
|
||||
if(!other->CheckHitChance(other, skillinuse, Hand)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack missed. Damage set to 0.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Attack missed. Damage set to 0.");
|
||||
damage = 0;
|
||||
other->AddToHateList(this, 0);
|
||||
} else { //we hit, try to avoid it
|
||||
@@ -6185,13 +6185,13 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
ApplyMeleeDamageBonus(skillinuse, damage);
|
||||
damage += (itembonuses.HeroicSTR / 10) + (damage * other->GetSkillDmgTaken(skillinuse) / 100) + GetSkillDmgAmt(skillinuse);
|
||||
TryCriticalHit(other, skillinuse, damage, opts);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Generating hate %d towards %s", hate, GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Generating hate %d towards %s", hate, GetCleanName());
|
||||
// now add done damage to the hate list
|
||||
//other->AddToHateList(this, hate);
|
||||
}
|
||||
else
|
||||
other->AddToHateList(this, 0);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all reductions: %d", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all reductions: %d", damage);
|
||||
}
|
||||
|
||||
//riposte
|
||||
@@ -6253,19 +6253,19 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b
|
||||
|
||||
//break invis when you attack
|
||||
if(invisible) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility due to melee attack.");
|
||||
BuffFadeByEffect(SE_Invisibility);
|
||||
BuffFadeByEffect(SE_Invisibility2);
|
||||
invisible = false;
|
||||
}
|
||||
if(invisible_undead) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. undead due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. undead due to melee attack.");
|
||||
BuffFadeByEffect(SE_InvisVsUndead);
|
||||
BuffFadeByEffect(SE_InvisVsUndead2);
|
||||
invisible_undead = false;
|
||||
}
|
||||
if(invisible_animals){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. animals due to melee attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Removing invisibility vs. animals due to melee attack.");
|
||||
BuffFadeByEffect(SE_InvisVsAnimals);
|
||||
invisible_animals = false;
|
||||
}
|
||||
@@ -7028,7 +7028,7 @@ int32 Bot::CalcBotFocusEffect(BotfocusType bottype, uint16 focus_id, uint16 spel
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "CalcFocusEffect: unknown limit spelltype %d", focus_spell.base[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "CalcFocusEffect: unknown limit spelltype %d", focus_spell.base[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -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:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Spells, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Spells, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
}
|
||||
}
|
||||
//Check for spell skill limits.
|
||||
@@ -7378,7 +7378,7 @@ float Bot::GetProcChances(float ProcBonus, uint16 hand) {
|
||||
ProcChance += ProcChance*ProcBonus / 100.0f;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
|
||||
return ProcChance;
|
||||
}
|
||||
|
||||
@@ -7414,7 +7414,7 @@ bool Bot::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
|
||||
/////////////////////////////////////////////////////////
|
||||
if (IsEnraged() && !other->BehindMob(this, other->GetX(), other->GetY())) {
|
||||
damage = -3;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am enraged, riposting frontal attack.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "I am enraged, riposting frontal attack.");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
@@ -7556,7 +7556,7 @@ bool Bot::AvoidDamage(Mob* other, int32 &damage, bool CanRiposte)
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all avoidances: %d", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Final damage after all avoidances: %d", damage);
|
||||
|
||||
if (damage < 0)
|
||||
return true;
|
||||
@@ -7609,14 +7609,14 @@ bool Bot::TryFinishingBlow(Mob *defender, SkillUseTypes skillinuse)
|
||||
uint16 levelreq = aabonuses.FinishingBlowLvl[0];
|
||||
|
||||
if(defender->GetLevel() <= levelreq && (chance >= zone->random.Int(0, 1000))){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Landed a finishing blow: levelreq at %d, other level %d", levelreq , defender->GetLevel());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Landed a finishing blow: levelreq at %d, other level %d", levelreq , defender->GetLevel());
|
||||
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, FINISHING_BLOW, GetName());
|
||||
defender->Damage(this, damage, SPELL_UNKNOWN, skillinuse);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "FAILED a finishing blow: levelreq at %d, other level %d", levelreq , defender->GetLevel());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "FAILED a finishing blow: levelreq at %d, other level %d", levelreq , defender->GetLevel());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -7624,7 +7624,7 @@ bool Bot::TryFinishingBlow(Mob *defender, SkillUseTypes skillinuse)
|
||||
}
|
||||
|
||||
void Bot::DoRiposte(Mob* defender) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a riposte");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a riposte");
|
||||
|
||||
if (!defender)
|
||||
return;
|
||||
@@ -7637,7 +7637,7 @@ void Bot::DoRiposte(Mob* defender) {
|
||||
defender->GetItemBonuses().GiveDoubleRiposte[0];
|
||||
|
||||
if(DoubleRipChance && (DoubleRipChance >= zone->random.Int(0, 100))) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a double riposte (%d percent chance)", DoubleRipChance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Preforming a double riposte (%d percent chance)", DoubleRipChance);
|
||||
|
||||
defender->Attack(this, MainPrimary, true);
|
||||
}
|
||||
@@ -8207,7 +8207,7 @@ bool Bot::TryHeadShot(Mob* defender, SkillUseTypes skillInUse) {
|
||||
float AttackerChance = 0.20f + ((float)(rangerLevel - 51) * 0.005f);
|
||||
float DefenderChance = (float)zone->random.Real(0.00f, 1.00f);
|
||||
if(AttackerChance > DefenderChance) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Landed a headshot: Attacker chance was %f and Defender chance was %f.", AttackerChance, DefenderChance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Landed a headshot: Attacker chance was %f and Defender chance was %f.", AttackerChance, DefenderChance);
|
||||
// WildcardX: At the time I wrote this, there wasnt a string id for something like HEADSHOT_BLOW
|
||||
//entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, FINISHING_BLOW, GetName());
|
||||
entity_list.MessageClose(this, false, 200, MT_CritMelee, "%s has scored a leathal HEADSHOT!", GetName());
|
||||
@@ -8215,7 +8215,7 @@ bool Bot::TryHeadShot(Mob* defender, SkillUseTypes skillInUse) {
|
||||
Result = true;
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "FAILED a headshot: Attacker chance was %f and Defender chance was %f.", AttackerChance, DefenderChance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "FAILED a headshot: Attacker chance was %f and Defender chance was %f.", AttackerChance, DefenderChance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8441,7 +8441,7 @@ void Bot::ProcessGuildInvite(Client* guildOfficer, Bot* botToGuild) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Inviting %s (%d) into guild %s (%d)", botToGuild->GetName(), botToGuild->GetBotID(), guild_mgr.GetGuildName(client->GuildID()), client->GuildID());
|
||||
// Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Inviting %s (%d) into guild %s (%d)", botToGuild->GetName(), botToGuild->GetBotID(), guild_mgr.GetGuildName(client->GuildID()), client->GuildID());
|
||||
|
||||
SetBotGuildMembership(botToGuild->GetBotID(), guildOfficer->GuildID(), GUILD_MEMBER);
|
||||
|
||||
@@ -8548,7 +8548,7 @@ int32 Bot::CalcMaxMana() {
|
||||
}
|
||||
default:
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
max_mana = 0;
|
||||
break;
|
||||
}
|
||||
@@ -9076,7 +9076,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t
|
||||
|
||||
if(zone && !zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
|
||||
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
||||
|
||||
if(casting_spell_id == spell_id)
|
||||
@@ -9084,7 +9084,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t
|
||||
|
||||
if(GetClass() != BARD) {
|
||||
if(!IsValidSpell(spell_id) || casting_spell_id || delaytimer || spellend_timer.Enabled() || IsStunned() || IsFeared() || IsMezzed() || (IsSilenced() && !IsDiscipline(spell_id)) || (IsAmnesiad() && IsDiscipline(spell_id))) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d",
|
||||
IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced() );
|
||||
if(IsSilenced() && !IsDiscipline(spell_id))
|
||||
Message_StringID(13, SILENCED_STRING);
|
||||
@@ -9105,7 +9105,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t
|
||||
|
||||
//cannot cast under deivne aura
|
||||
if(DivineAura()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Spell casting canceled: cannot cast while Divine Aura is in effect.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Spell casting canceled: cannot cast while Divine Aura is in effect.");
|
||||
InterruptSpell(173, 0x121, false);
|
||||
return(false);
|
||||
}
|
||||
@@ -9119,7 +9119,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t
|
||||
InterruptSpell(fizzle_msg, 0x121, spell_id);
|
||||
|
||||
uint32 use_mana = ((spells[spell_id].mana) / 4);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Spell casting canceled: fizzled. %d mana has been consumed", use_mana);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Spell casting canceled: fizzled. %d mana has been consumed", use_mana);
|
||||
|
||||
// fizzle 1/4 the mana away
|
||||
SetMana(GetMana() - use_mana);
|
||||
@@ -9127,7 +9127,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t
|
||||
}
|
||||
|
||||
if (HasActiveSong()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Casting a new spell/song while singing a song. Killing old song %d.", bardsong);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Casting a new spell/song while singing a song. Killing old song %d.", bardsong);
|
||||
//Note: this does NOT tell the client
|
||||
//_StopSong();
|
||||
bardsong = 0;
|
||||
@@ -9256,7 +9256,7 @@ bool Bot::IsImmuneToSpell(uint16 spell_id, Mob *caster) {
|
||||
if(caster->IsBot()) {
|
||||
if(spells[spell_id].targettype == ST_Undead) {
|
||||
if((GetBodyType() != BT_SummonedUndead) && (GetBodyType() != BT_Undead) && (GetBodyType() != BT_Vampire)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Bot's target is not an undead.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Bot's target is not an undead.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -9266,13 +9266,13 @@ bool Bot::IsImmuneToSpell(uint16 spell_id, Mob *caster) {
|
||||
&& (GetBodyType() != BT_Summoned2)
|
||||
&& (GetBodyType() != BT_Summoned3)
|
||||
) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Bot's target is not a summoned creature.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Bot's target is not a summoned creature.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "No bot immunities to spell %d found.", spell_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "No bot immunities to spell %d found.", spell_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15454,7 +15454,7 @@ bool EntityList::Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, fl
|
||||
// according to Rogean, Live NPCs will just cast through walls/floors, no problem..
|
||||
//
|
||||
// This check was put in to address an idle-mob CPU issue
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -950,7 +950,7 @@ bool Bot::AI_PursueCastCheck() {
|
||||
|
||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Bot Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Bot Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
|
||||
|
||||
if(!AICastSpell(GetTarget(), 100, SpellType_Snare)) {
|
||||
if(!AICastSpell(GetTarget(), 100, SpellType_Lifetap)) {
|
||||
@@ -1055,7 +1055,7 @@ bool Bot::AI_EngagedCastCheck() {
|
||||
BotStanceType botStance = GetBotStance();
|
||||
bool mayGetAggro = HasOrMayGetAggro();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered (BOTS). Trying to cast healing spells then maybe offensive spells.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered (BOTS). Trying to cast healing spells then maybe offensive spells.");
|
||||
|
||||
if(botClass == CLERIC) {
|
||||
if(!AICastSpell(GetTarget(), GetChanceToCastBySpellType(SpellType_Escape), SpellType_Escape)) {
|
||||
|
||||
+35
-35
@@ -340,7 +340,7 @@ Client::~Client() {
|
||||
ToggleBuyerMode(false);
|
||||
|
||||
if(conn_state != ClientConnectFinished) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client '%s' was destroyed before reaching the connected state:", GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client '%s' was destroyed before reaching the connected state:", GetName());
|
||||
ReportConnectingState();
|
||||
}
|
||||
|
||||
@@ -438,31 +438,31 @@ void Client::SendLogoutPackets() {
|
||||
void Client::ReportConnectingState() {
|
||||
switch(conn_state) {
|
||||
case NoPacketsReceived: //havent gotten anything
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client has not sent us an initial zone entry packet.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client has not sent us an initial zone entry packet.");
|
||||
break;
|
||||
case ReceivedZoneEntry: //got the first packet, loading up PP
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client sent initial zone packet, but we never got their player info from the database.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client sent initial zone packet, but we never got their player info from the database.");
|
||||
break;
|
||||
case PlayerProfileLoaded: //our DB work is done, sending it
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "We were sending the player profile, tributes, tasks, spawns, time and weather, but never finished.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "We were sending the player profile, tributes, tasks, spawns, time and weather, but never finished.");
|
||||
break;
|
||||
case ZoneInfoSent: //includes PP, tributes, tasks, spawns, time and weather
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "We successfully sent player info and spawns, waiting for client to request new zone.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "We successfully sent player info and spawns, waiting for client to request new zone.");
|
||||
break;
|
||||
case NewZoneRequested: //received and sent new zone request
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "We received client's new zone request, waiting for client spawn request.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "We received client's new zone request, waiting for client spawn request.");
|
||||
break;
|
||||
case ClientSpawnRequested: //client sent ReqClientSpawn
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "We received the client spawn request, and were sending objects, doors, zone points and some other stuff, but never finished.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "We received the client spawn request, and were sending objects, doors, zone points and some other stuff, but never finished.");
|
||||
break;
|
||||
case ZoneContentsSent: //objects, doors, zone points
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "The rest of the zone contents were successfully sent, waiting for client ready notification.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "The rest of the zone contents were successfully sent, waiting for client ready notification.");
|
||||
break;
|
||||
case ClientReadyReceived: //client told us its ready, send them a bunch of crap like guild MOTD, etc
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "We received client ready notification, but never finished Client::CompleteConnect");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "We received client ready notification, but never finished Client::CompleteConnect");
|
||||
break;
|
||||
case ClientConnectFinished: //client finally moved to finished state, were done here
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client is successfully connected.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client is successfully connected.");
|
||||
break;
|
||||
};
|
||||
}
|
||||
@@ -650,7 +650,7 @@ bool Client::SendAllPackets() {
|
||||
if(eqs)
|
||||
eqs->FastQueuePacket((EQApplicationPacket **)&cp->app, cp->ack_req);
|
||||
iterator.RemoveCurrent();
|
||||
Log.DebugCategory(EQEmuLogSys::Moderate, EQEmuLogSys::Client_Server_Packet, "Transmitting a packet");
|
||||
Log.DoLog(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));
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
|
||||
Log.DoLog(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)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Moderate, EQEmuLogSys::Zone_Server, __FUNCTION__ " - %s is a GM", GetName());
|
||||
Log.DoLog(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);
|
||||
@@ -1911,7 +1911,7 @@ void Client::ReadBook(BookRequest_Struct *book) {
|
||||
|
||||
if (booktxt2[0] != '\0') {
|
||||
#if EQDEBUG >= 6
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Client::ReadBook() textfile:%s Text:%s", txtfile, booktxt2.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Client::ReadBook() textfile:%s Text:%s", txtfile, booktxt2.c_str());
|
||||
#endif
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ReadBook, length + sizeof(BookText_Struct));
|
||||
|
||||
@@ -2105,7 +2105,7 @@ void Client::AddMoneyToPP(uint64 copper, bool updateclient){
|
||||
|
||||
SaveCurrency();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client::AddMoneyToPP() %s should have: plat:%i gold:%i silver:%i copper:%i", GetName(), m_pp.platinum, m_pp.gold, m_pp.silver, m_pp.copper);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client::AddMoneyToPP() %s should have: plat:%i gold:%i silver:%i copper:%i", GetName(), m_pp.platinum, m_pp.gold, m_pp.silver, m_pp.copper);
|
||||
}
|
||||
|
||||
void Client::EVENT_ITEM_ScriptStopReturn(){
|
||||
@@ -2145,7 +2145,7 @@ void Client::AddMoneyToPP(uint32 copper, uint32 silver, uint32 gold, uint32 plat
|
||||
SaveCurrency();
|
||||
|
||||
#if (EQDEBUG>=5)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client::AddMoneyToPP() %s should have: plat:%i gold:%i silver:%i copper:%i",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client::AddMoneyToPP() %s should have: plat:%i gold:%i silver:%i copper:%i",
|
||||
GetName(), m_pp.platinum, m_pp.gold, m_pp.silver, m_pp.copper);
|
||||
#endif
|
||||
}
|
||||
@@ -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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d successfully gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d successfully gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
return true;
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d failed to gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d failed to gain with %.4f%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
|
||||
}
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Skill %d at value %d cannot increase due to maxmum %d", skillid, skillval, maxskill);
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d successfully gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d successfully gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
}
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d failed to gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Language %d at value %d failed to gain with %.4f%%chance", langid, LangSkill, Chance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2364,7 +2364,7 @@ uint16 Client::GetMaxSkillAfterSpecializationRules(SkillUseTypes skillid, uint16
|
||||
|
||||
Save();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Reset %s's caster specialization skills to 1. "
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Reset %s's caster specialization skills to 1. "
|
||||
"Too many specializations skills were above 50.", GetCleanName());
|
||||
}
|
||||
|
||||
@@ -4544,14 +4544,14 @@ void Client::HandleLDoNOpen(NPC *target)
|
||||
{
|
||||
if(target->GetClass() != LDON_TREASURE)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "%s tried to open %s but %s was not a treasure chest.",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "%s tried to open %s but %s was not a treasure chest.",
|
||||
GetName(), target->GetName(), target->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
if(DistNoRootNoZ(*target) > RuleI(Adventure, LDoNTrapDistanceUse))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "%s tried to open %s but %s was out of range",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "%s tried to open %s but %s was out of range",
|
||||
GetName(), target->GetName(), target->GetName());
|
||||
Message(13, "Treasure chest out of range.");
|
||||
return;
|
||||
@@ -5294,7 +5294,7 @@ void Client::SendRewards()
|
||||
"ORDER BY reward_id", AccountID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::SendRewards(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::SendRewards(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5362,7 +5362,7 @@ bool Client::TryReward(uint32 claim_id) {
|
||||
AccountID(), claim_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5389,7 +5389,7 @@ bool Client::TryReward(uint32 claim_id) {
|
||||
AccountID(), claim_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
else {
|
||||
query = StringFormat("UPDATE account_rewards SET amount = (amount-1) "
|
||||
@@ -5397,7 +5397,7 @@ bool Client::TryReward(uint32 claim_id) {
|
||||
AccountID(), claim_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
InternalVeteranReward ivr = (*iter);
|
||||
@@ -6211,7 +6211,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
PetRecord record;
|
||||
if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown doppelganger spell id: %d, check pets table", spell_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown doppelganger spell id: %d, check pets table", spell_id);
|
||||
Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
|
||||
return;
|
||||
}
|
||||
@@ -6225,7 +6225,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
|
||||
const NPCType *npc_type = database.GetNPCType(pet.npc_id);
|
||||
if(npc_type == nullptr) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for doppelganger spell id: %d", spell_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for doppelganger spell id: %d", spell_id);
|
||||
Message(0,"Unable to find pet!");
|
||||
return;
|
||||
}
|
||||
@@ -8149,7 +8149,7 @@ void Client::Consume(const Item_Struct *item, uint8 type, int16 slot, bool auto_
|
||||
entity_list.MessageClose_StringID(this, true, 50, 0, EATING_MESSAGE, GetName(), item->Name);
|
||||
|
||||
#if EQDEBUG >= 5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Eating from slot:%i", (int)slot);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Eating from slot:%i", (int)slot);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -8166,7 +8166,7 @@ void Client::Consume(const Item_Struct *item, uint8 type, int16 slot, bool auto_
|
||||
entity_list.MessageClose_StringID(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
|
||||
|
||||
#if EQDEBUG >= 5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Drinking from slot:%i", (int)slot);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Drinking from slot:%i", (int)slot);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -8289,11 +8289,11 @@ std::string Client::TextLink::GenerateLink()
|
||||
if ((m_Link.length() == 0) || (m_Link.length() > 250)) {
|
||||
m_Error = true;
|
||||
m_Link = "<LINKER ERROR>";
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})",
|
||||
m_LinkType, m_Link.length(), m_LinkBody.length(), m_LinkText.length());
|
||||
#if EQDEBUG >= 5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ">> LinkBody: %s", m_LinkBody.c_str());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ">> LinkText: %s", m_LinkText.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ">> LinkBody: %s", m_LinkBody.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ">> LinkText: %s", m_LinkText.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -826,7 +826,7 @@ int32 Client::acmod() {
|
||||
return (65 + ((agility-300) / 21));
|
||||
}
|
||||
#if EQDEBUG >= 11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::acmod(): Agility: %i, Level: %i",agility,level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::acmod(): Agility: %i, Level: %i",agility,level);
|
||||
#endif
|
||||
return 0;
|
||||
};
|
||||
@@ -935,7 +935,7 @@ int32 Client::CalcMaxMana()
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
max_mana = 0;
|
||||
break;
|
||||
}
|
||||
@@ -956,7 +956,7 @@ int32 Client::CalcMaxMana()
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client::CalcMaxMana() called for %s - returning %d", GetName(), max_mana);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client::CalcMaxMana() called for %s - returning %d", GetName(), max_mana);
|
||||
#endif
|
||||
return max_mana;
|
||||
}
|
||||
@@ -1046,14 +1046,14 @@ int32 Client::CalcBaseMana()
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
max_m = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client::CalcBaseMana() called for %s - returning %d", GetName(), max_m);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client::CalcBaseMana() called for %s - returning %d", GetName(), max_m);
|
||||
#endif
|
||||
return max_m;
|
||||
}
|
||||
@@ -1896,7 +1896,7 @@ uint32 Mob::GetInstrumentMod(uint16 spell_id) const
|
||||
if (effectmod > effectmodcap)
|
||||
effectmod = effectmodcap;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n",
|
||||
GetName(), spell_id, effectmod, effectmodcap);
|
||||
|
||||
return effectmod;
|
||||
|
||||
+253
-253
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -799,7 +799,7 @@ void Client::OnDisconnect(bool hard_disconnect) {
|
||||
Mob *Other = trade->With();
|
||||
if(Other)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client disconnected during a trade. Returning their items.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client disconnected during a trade. Returning their items.");
|
||||
FinishTrade(this);
|
||||
|
||||
if(Other->IsClient())
|
||||
@@ -836,7 +836,7 @@ void Client::BulkSendInventoryItems() {
|
||||
if(inst) {
|
||||
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Incomplete Trade Transaction: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Incomplete Trade Transaction: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, false);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
@@ -1037,7 +1037,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
// Account for merchant lists with gaps.
|
||||
if (ml.slot >= i) {
|
||||
if (ml.slot > i)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "(WARNING) Merchantlist contains gap at slot %d. Merchant: %d, NPC: %d", i, merchant_id, npcid);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "(WARNING) Merchantlist contains gap at slot %d. Merchant: %d, NPC: %d", i, merchant_id, npcid);
|
||||
i = ml.slot + 1;
|
||||
}
|
||||
}
|
||||
@@ -1129,7 +1129,7 @@ uint8 Client::WithCustomer(uint16 NewCustomer){
|
||||
Client* c = entity_list.GetClientByID(CustomerID);
|
||||
|
||||
if(!c) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Previous customer has gone away.");
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Unexpected OP_RezzAnswer. Ignoring it.");
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Player %s got a %i Rezz, spellid %i in zone%i, instance id %i",
|
||||
Log.DoLog(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);
|
||||
|
||||
@@ -1201,7 +1201,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
{
|
||||
if(app->size != sizeof(MemorizeSpell_Struct))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size on OP_MemorizeSpell. Got: %i, Expected: %i", app->size, sizeof(MemorizeSpell_Struct));
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size on OP_MemorizeSpell. Got: %i, Expected: %i", app->size, sizeof(MemorizeSpell_Struct));
|
||||
DumpPacket(app);
|
||||
return;
|
||||
}
|
||||
@@ -1723,12 +1723,12 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
||||
SkillUseTypes skill = (SkillUseTypes) gmskill->skill_id;
|
||||
|
||||
if(!CanHaveSkill(skill)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Tried to train skill %d, which is not allowed.", skill);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Tried to train skill %d, which is not allowed.", skill);
|
||||
return;
|
||||
}
|
||||
|
||||
if(MaxSkill(skill) == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Tried to train skill %d, but training is not allowed at this level.", skill);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Skills, "Tried to train skill %d, but training is not allowed at this level.", skill);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2122,7 +2122,7 @@ void Client::HandleRespawnFromHover(uint32 Option)
|
||||
{
|
||||
if (PendingRezzXP < 0 || PendingRezzSpellID == 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Unexpected Rezz from hover request.");
|
||||
Log.DoLog(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())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Hover Rez in zone %s for corpse %s",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Hover Rez in zone %s for corpse %s",
|
||||
zone->GetShortName(), PendingRezzCorpseName.c_str());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
|
||||
corpse->IsRezzed(true);
|
||||
corpse->CompleteResurrection();
|
||||
|
||||
+30
-30
@@ -443,13 +443,13 @@ int command_init(void) {
|
||||
if ((itr=command_settings.find(cur->first))!=command_settings.end())
|
||||
{
|
||||
cur->second->access = itr->second;
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Commands, "command_init(): - Command '%s' set to access level %d.", cur->first.c_str(), itr->second);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Commands, "command_init(): - Command '%s' set to access level %d.", cur->first.c_str(), itr->second);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef COMMANDS_WARNINGS
|
||||
if(cur->second->access == 0)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "command_init(): Warning: Command '%s' defaulting to access level 0!" , cur->first.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "command_init(): Warning: Command '%s' defaulting to access level 0!" , cur->first.c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -494,7 +494,7 @@ int command_add(const char *command_string, const char *desc, int access, CmdFun
|
||||
std::string cstr(command_string);
|
||||
|
||||
if(commandlist.count(cstr) != 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "command_add() - Command '%s' is a duplicate - check command.cpp." , command_string);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "command_add() - Command '%s' is a duplicate - check command.cpp." , command_string);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -568,12 +568,12 @@ int command_realdispatch(Client *c, const char *message)
|
||||
|
||||
#ifdef COMMANDS_LOGGING
|
||||
if(cur->access >= COMMANDS_LOGGING_MIN_STATUS) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Commands, "%s (%s) used command: %s (target=%s)", c->GetName(), c->AccountName(), message, c->GetTarget()?c->GetTarget()->GetName():"NONE");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Commands, "%s (%s) used command: %s (target=%s)", c->GetName(), c->AccountName(), message, c->GetTarget()?c->GetTarget()->GetName():"NONE");
|
||||
}
|
||||
#endif
|
||||
|
||||
if(cur->function == nullptr) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Command '%s' has a null function\n", cstr.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Command '%s' has a null function\n", cstr.c_str());
|
||||
return(-1);
|
||||
} else {
|
||||
//dispatch C++ command
|
||||
@@ -1292,7 +1292,7 @@ void command_viewpetition(Client *c, const Seperator *sep)
|
||||
if (!results.Success())
|
||||
return;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "View petition request from %s, petition number: %i", c->GetName(), atoi(sep->argplus[1]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "View petition request from %s, petition number: %i", c->GetName(), atoi(sep->argplus[1]) );
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
c->Message(13,"There was an error in your request: ID not found! Please check the Id and try again.");
|
||||
@@ -1317,7 +1317,7 @@ void command_petitioninfo(Client *c, const Seperator *sep)
|
||||
if (!results.Success())
|
||||
return;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Petition information request from %s, petition number:", c->GetName(), atoi(sep->argplus[1]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Petition information request from %s, petition number:", c->GetName(), atoi(sep->argplus[1]) );
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
c->Message(13,"There was an error in your request: ID not found! Please check the Id and try again.");
|
||||
@@ -1343,7 +1343,7 @@ void command_delpetition(Client *c, const Seperator *sep)
|
||||
if (!results.Success())
|
||||
return;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Delete petition request from %s, petition number:", c->GetName(), atoi(sep->argplus[1]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Delete petition request from %s, petition number:", c->GetName(), atoi(sep->argplus[1]) );
|
||||
|
||||
}
|
||||
|
||||
@@ -1566,7 +1566,7 @@ void command_permaclass(Client *c, const Seperator *sep)
|
||||
c->Message(0,"Target is not a client.");
|
||||
else {
|
||||
c->Message(0, "Setting %s's class...Sending to char select.", t->GetName());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Class change request from %s for %s, requested class:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Class change request from %s for %s, requested class:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||
t->SetBaseClass(atoi(sep->arg[1]));
|
||||
t->Save();
|
||||
t->Kick();
|
||||
@@ -1588,7 +1588,7 @@ void command_permarace(Client *c, const Seperator *sep)
|
||||
c->Message(0,"Target is not a client.");
|
||||
else {
|
||||
c->Message(0, "Setting %s's race - zone to take effect",t->GetName());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Permanant race change request from %s for %s, requested race:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Permanant race change request from %s for %s, requested race:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||
uint32 tmp = Mob::GetDefaultGender(atoi(sep->arg[1]), t->GetBaseGender());
|
||||
t->SetBaseRace(atoi(sep->arg[1]));
|
||||
t->SetBaseGender(tmp);
|
||||
@@ -1612,7 +1612,7 @@ void command_permagender(Client *c, const Seperator *sep)
|
||||
c->Message(0,"Target is not a client.");
|
||||
else {
|
||||
c->Message(0, "Setting %s's gender - zone to take effect",t->GetName());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Permanant gender change request from %s for %s, requested gender:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Permanant gender change request from %s for %s, requested gender:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) );
|
||||
t->SetBaseGender(atoi(sep->arg[1]));
|
||||
t->Save();
|
||||
t->SendIllusionPacket(atoi(sep->arg[1]));
|
||||
@@ -1954,7 +1954,7 @@ void command_dbspawn2(Client *c, const Seperator *sep)
|
||||
{
|
||||
|
||||
if (sep->IsNumber(1) && sep->IsNumber(2) && sep->IsNumber(3)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Spawning database spawn");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Spawning database spawn");
|
||||
uint16 cond = 0;
|
||||
int16 cond_min = 0;
|
||||
if(sep->IsNumber(4)) {
|
||||
@@ -2274,7 +2274,7 @@ void command_setlanguage(Client *c, const Seperator *sep)
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Set language request from %s, target:%s lang_id:%i value:%i", c->GetName(), c->GetTarget()->GetName(), atoi(sep->arg[1]), atoi(sep->arg[2]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Set language request from %s, target:%s lang_id:%i value:%i", c->GetName(), c->GetTarget()->GetName(), atoi(sep->arg[1]), atoi(sep->arg[2]) );
|
||||
uint8 langid = (uint8)atoi(sep->arg[1]);
|
||||
uint8 value = (uint8)atoi(sep->arg[2]);
|
||||
c->GetTarget()->CastToClient()->SetLanguageSkill( langid, value );
|
||||
@@ -2299,7 +2299,7 @@ void command_setskill(Client *c, const Seperator *sep)
|
||||
c->Message(0, " x = 0 to %d", HIGHEST_CAN_SET_SKILL);
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Set skill request from %s, target:%s skill_id:%i value:%i", c->GetName(), c->GetTarget()->GetName(), atoi(sep->arg[1]), atoi(sep->arg[2]) );
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Set skill request from %s, target:%s skill_id:%i value:%i", c->GetName(), c->GetTarget()->GetName(), atoi(sep->arg[1]), atoi(sep->arg[2]) );
|
||||
int skill_num = atoi(sep->arg[1]);
|
||||
uint16 skill_value = atoi(sep->arg[2]);
|
||||
if(skill_num < HIGHEST_SKILL)
|
||||
@@ -2319,7 +2319,7 @@ void command_setskillall(Client *c, const Seperator *sep)
|
||||
}
|
||||
else {
|
||||
if (c->Admin() >= commandSetSkillsOther || c->GetTarget()==c || c->GetTarget()==0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Set ALL skill request from %s, target:%s", c->GetName(), c->GetTarget()->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Set ALL skill request from %s, target:%s", c->GetName(), c->GetTarget()->GetName());
|
||||
uint16 level = atoi(sep->arg[1]);
|
||||
for(SkillUseTypes skill_num=Skill1HBlunt;skill_num <= HIGHEST_SKILL;skill_num=(SkillUseTypes)(skill_num+1)) {
|
||||
c->GetTarget()->CastToClient()->SetSkill(skill_num, level);
|
||||
@@ -3114,7 +3114,7 @@ void command_listpetition(Client *c, const Seperator *sep)
|
||||
if (!results.Success())
|
||||
return;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Petition list requested by %s", c->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Petition list requested by %s", c->GetName());
|
||||
|
||||
if (results.RowCount() == 0)
|
||||
return;
|
||||
@@ -3771,7 +3771,7 @@ void command_lastname(Client *c, const Seperator *sep)
|
||||
|
||||
if(c->GetTarget() && c->GetTarget()->IsClient())
|
||||
t=c->GetTarget()->CastToClient();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "#lastname request from %s for %s", c->GetName(), t->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "#lastname request from %s for %s", c->GetName(), t->GetName());
|
||||
|
||||
if(strlen(sep->arg[1]) <= 70)
|
||||
t->ChangeLastName(sep->arg[1]);
|
||||
@@ -4545,10 +4545,10 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if(guild_id == GUILD_NONE) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Removing %s (%d) from guild with GM command.", c->GetName(),
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Removing %s (%d) from guild with GM command.", c->GetName(),
|
||||
sep->arg[2], charid);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Putting %s (%d) into guild %s (%d) with GM command.", c->GetName(),
|
||||
Log.DoLog(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);
|
||||
}
|
||||
@@ -4597,7 +4597,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting %s (%d)'s guild rank to %d with GM command.", c->GetName(),
|
||||
Log.DoLog(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))
|
||||
@@ -4639,7 +4639,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
|
||||
uint32 id = guild_mgr.CreateGuild(sep->argplus[3], leader);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Creating guild %s with leader %d with GM command. It was given id %lu.", c->GetName(),
|
||||
Log.DoLog(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)
|
||||
@@ -4678,7 +4678,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Deleting guild %s (%d) with GM command.", c->GetName(),
|
||||
guild_mgr.GetGuildName(id), id);
|
||||
|
||||
if (!guild_mgr.DeleteGuild(id))
|
||||
@@ -4712,7 +4712,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Renaming guild %s (%d) to '%s' with GM command.", c->GetName(),
|
||||
Log.DoLog(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]))
|
||||
@@ -4763,7 +4763,7 @@ void command_guild(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "%s: Setting leader of guild %s (%d) to %d with GM command.", c->GetName(),
|
||||
Log.DoLog(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))
|
||||
@@ -4869,7 +4869,7 @@ void command_manaburn(Client *c, const Seperator *sep)
|
||||
target->Damage(c, nukedmg, 2751, SkillAbjuration/*hackish*/);
|
||||
c->Message(4,"You unleash an enormous blast of magical energies.");
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Manaburn request from %s, damage: %d", c->GetName(), nukedmg);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Manaburn request from %s, damage: %d", c->GetName(), nukedmg);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5221,7 +5221,7 @@ void command_scribespells(Client *c, const Seperator *sep)
|
||||
t->Message(0, "Scribing spells to spellbook.");
|
||||
if(t != c)
|
||||
c->Message(0, "Scribing spells for %s.", t->GetName());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Scribe spells request for %s from %s, levels: %u -> %u", t->GetName(), c->GetName(), min_level, max_level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Scribe spells request for %s from %s, levels: %u -> %u", t->GetName(), c->GetName(), min_level, max_level);
|
||||
|
||||
for(curspell = 0, book_slot = t->GetNextAvailableSpellBookSlot(), count = 0; curspell < SPDAT_RECORDS && book_slot < MAX_PP_SPELLBOOK; curspell++, book_slot = t->GetNextAvailableSpellBookSlot(book_slot))
|
||||
{
|
||||
@@ -5278,7 +5278,7 @@ void command_scribespell(Client *c, const Seperator *sep) {
|
||||
if(t != c)
|
||||
c->Message(0, "Scribing spell: %s (%i) for %s.", spells[spell_id].name, spell_id, t->GetName());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Scribe spell: %s (%i) request for %s from %s.", spells[spell_id].name, spell_id, t->GetName(), c->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Scribe spell: %s (%i) request for %s from %s.", spells[spell_id].name, spell_id, t->GetName(), c->GetName());
|
||||
|
||||
if (spells[spell_id].classes[WARRIOR] != 0 && spells[spell_id].skill != 52 && spells[spell_id].classes[t->GetPP().class_ - 1] > 0 && !IsDiscipline(spell_id)) {
|
||||
book_slot = t->GetNextAvailableSpellBookSlot();
|
||||
@@ -5325,7 +5325,7 @@ void command_unscribespell(Client *c, const Seperator *sep) {
|
||||
if(t != c)
|
||||
c->Message(0, "Unscribing spell: %s (%i) for %s.", spells[spell_id].name, spell_id, t->GetName());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Unscribe spell: %s (%i) request for %s from %s.", spells[spell_id].name, spell_id, t->GetName(), c->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Unscribe spell: %s (%i) request for %s from %s.", spells[spell_id].name, spell_id, t->GetName(), c->GetName());
|
||||
}
|
||||
else {
|
||||
t->Message(13, "Unable to unscribe spell: %s (%i) from your spellbook. This spell is not scribed.", spells[spell_id].name, spell_id);
|
||||
@@ -7862,7 +7862,7 @@ void command_traindisc(Client *c, const Seperator *sep)
|
||||
t->Message(0, "Training disciplines");
|
||||
if(t != c)
|
||||
c->Message(0, "Training disciplines for %s.", t->GetName());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Train disciplines request for %s from %s, levels: %u -> %u", t->GetName(), c->GetName(), min_level, max_level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Train disciplines request for %s from %s, levels: %u -> %u", t->GetName(), c->GetName(), min_level, max_level);
|
||||
|
||||
for(curspell = 0, count = 0; curspell < SPDAT_RECORDS; curspell++)
|
||||
{
|
||||
@@ -10394,7 +10394,7 @@ void command_logtest(Client *c, const Seperator *sep){
|
||||
if (sep->IsNumber(1)){
|
||||
uint32 i = 0;
|
||||
for (i = 0; i < atoi(sep->arg[1]); i++){
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "[%u] Test... Took %f seconds", i, ((float)(std::clock() - t)) / CLOCKS_PER_SEC);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "[%u] Test... Took %f seconds", i, ((float)(std::clock() - t)) / CLOCKS_PER_SEC);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -842,7 +842,7 @@ bool Corpse::Process() {
|
||||
spc->zone_id = zone->graveyard_zoneid();
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Moved %s player corpse to the designated graveyard in zone %s.", this->GetName(), database.GetZoneName(zone->graveyard_zoneid()));
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Moved %s player corpse to the designated graveyard in zone %s.", this->GetName(), database.GetZoneName(zone->graveyard_zoneid()));
|
||||
corpse_db_id = 0;
|
||||
}
|
||||
|
||||
@@ -872,10 +872,10 @@ bool Corpse::Process() {
|
||||
Save();
|
||||
player_corpse_depop = true;
|
||||
corpse_db_id = 0;
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Tagged %s player corpse has burried.", this->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Tagged %s player corpse has burried.", this->GetName());
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to bury %s player corpse.", this->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to bury %s player corpse.", this->GetName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
|
||||
for(; cur != end; ++cur) {
|
||||
ServerLootItem_Struct* item_data = *cur;
|
||||
item = database.GetItem(item_data->item_id);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Corpse Looting: %s was not sent to client loot window (corpse_dbid: %i, charname: %s(%s))", item->Name, GetCorpseDBID(), client->GetName(), client->GetGM() ? "GM" : "Owner");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Corpse Looting: %s was not sent to client loot window (corpse_dbid: %i, charname: %s(%s))", item->Name, GetCorpseDBID(), client->GetName(), client->GetGM() ? "GM" : "Owner");
|
||||
client->Message(0, "Inaccessable Corpse Item: %s", item->Name);
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -145,9 +145,9 @@ bool Doors::Process()
|
||||
void Doors::HandleClick(Client* sender, uint8 trigger)
|
||||
{
|
||||
//door debugging info dump
|
||||
Log.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);
|
||||
Log.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);
|
||||
Log.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);
|
||||
Log.DoLog(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);
|
||||
Log.DoLog(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);
|
||||
Log.DoLog(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;
|
||||
@@ -303,7 +303,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger)
|
||||
sender->CheckIncreaseSkill(SkillPickLock, nullptr, 1);
|
||||
|
||||
#if EQDEBUG>=5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Client has lockpicks: skill=%f", modskill);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Client has lockpicks: skill=%f", modskill);
|
||||
#endif
|
||||
|
||||
if(GetLockpick() <= modskill)
|
||||
@@ -560,13 +560,13 @@ void Doors::ToggleState(Mob *sender)
|
||||
}
|
||||
|
||||
void Doors::DumpDoor(){
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None,
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None,
|
||||
"db_id:%i door_id:%i zone_name:%s door_name:%s pos_x:%f pos_y:%f pos_z:%f heading:%f",
|
||||
db_id, door_id, zone_name, door_name, pos_x, pos_y, pos_z, heading);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None,
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None,
|
||||
"opentype:%i guild_id:%i lockpick:%i keyitem:%i nokeyring:%i trigger_door:%i trigger_type:%i door_param:%i open:%s",
|
||||
opentype, guild_id, lockpick, keyitem, nokeyring, trigger_door, trigger_type, door_param, (isopen) ? "open":"closed");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None,
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None,
|
||||
"dest_zone:%s dest_x:%f dest_y:%f dest_z:%f dest_heading:%f",
|
||||
dest_zone, dest_x, dest_y, dest_z, dest_heading);
|
||||
}
|
||||
@@ -645,7 +645,7 @@ int32 ZoneDatabase::GetDoorsDBCountPlusOne(const char *zone_name, int16 version)
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadDoors(int32 iDoorCount, Door *into, const char *zone_name, int16 version) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Doors from database...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Doors from database...");
|
||||
|
||||
|
||||
// Door tmpDoor;
|
||||
|
||||
+1
-1
@@ -461,7 +461,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
|
||||
const Item_Struct *item = database.GetItem(itemid);
|
||||
if(item == nullptr) {
|
||||
Message(13, "Unable to find the tome you turned in!");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid);
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ void PerlembParser::ReloadQuests() {
|
||||
perl = nullptr;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Error re-initializing perlembed: %s", e.what());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Error re-initializing perlembed: %s", e.what());
|
||||
throw e.what();
|
||||
}
|
||||
|
||||
|
||||
@@ -3519,7 +3519,7 @@ EXTERN_C XS(boot_quest)
|
||||
file[255] = '\0';
|
||||
|
||||
if(items != 1)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "boot_quest does not take any arguments.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "boot_quest does not take any arguments.");
|
||||
|
||||
char buf[128]; //shouldent have any function names longer than this.
|
||||
|
||||
|
||||
+5
-5
@@ -140,12 +140,12 @@ void Embperl::DoInit() {
|
||||
catch(const char *err)
|
||||
{
|
||||
//remember... lasterr() is no good if we crap out here, in construction
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "perl error: %s", err);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "perl error: %s", err);
|
||||
throw "failed to install eval_file hook";
|
||||
}
|
||||
|
||||
#ifdef EMBPERL_IO_CAPTURE
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "Tying perl output to eqemu logs");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "Tying perl output to eqemu logs");
|
||||
//make a tieable class to capture IO and pass it into EQEMuLog
|
||||
eval_pv(
|
||||
"package EQEmuIO; "
|
||||
@@ -170,14 +170,14 @@ void Embperl::DoInit() {
|
||||
,FALSE
|
||||
);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "Loading perlemb plugins.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "Loading perlemb plugins.");
|
||||
try
|
||||
{
|
||||
eval_pv("main::eval_file('plugin', 'plugin.pl');", FALSE);
|
||||
}
|
||||
catch(const char *err)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "Warning - plugin.pl: %s", err);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "Warning - plugin.pl: %s", err);
|
||||
}
|
||||
try
|
||||
{
|
||||
@@ -195,7 +195,7 @@ void Embperl::DoInit() {
|
||||
}
|
||||
catch(const char *err)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "Perl warning: %s", err);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "Perl warning: %s", err);
|
||||
}
|
||||
#endif //EMBPERL_PLUGIN
|
||||
in_use = false;
|
||||
|
||||
+3
-3
@@ -64,7 +64,7 @@ EXTERN_C XS(boot_qc)
|
||||
file[255] = '\0';
|
||||
|
||||
if(items != 1)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "boot_qc does not take any arguments.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "boot_qc does not take any arguments.");
|
||||
|
||||
char buf[128]; //shouldent have any function names longer than this.
|
||||
|
||||
@@ -100,7 +100,7 @@ XS(XS_EQEmuIO_PRINT)
|
||||
int len = 0;
|
||||
for(i = 0; *cur != '\0'; i++, cur++) {
|
||||
if(*cur == '\n') {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Quests, str);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Quests, str);
|
||||
len = 0;
|
||||
pos = i+1;
|
||||
} else {
|
||||
@@ -108,7 +108,7 @@ XS(XS_EQEmuIO_PRINT)
|
||||
}
|
||||
}
|
||||
if(len > 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Quests, str);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Quests, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -371,7 +371,7 @@ void EntityList::CheckGroupList (const char *fname, const int fline)
|
||||
{
|
||||
if (*it == nullptr)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "nullptr group, %s:%i", fname, fline);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "nullptr group, %s:%i", fname, fline);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -520,12 +520,12 @@ void EntityList::MobProcess()
|
||||
zone->StartShutdownTimer();
|
||||
Group *g = GetGroupByMob(mob);
|
||||
if(g) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "About to delete a client still in a group.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "About to delete a client still in a group.");
|
||||
g->DelMember(mob);
|
||||
}
|
||||
Raid *r = entity_list.GetRaidByClient(mob->CastToClient());
|
||||
if(r) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "About to delete a client still in a raid.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "About to delete a client still in a raid.");
|
||||
r->MemberZoned(mob->CastToClient());
|
||||
}
|
||||
entity_list.RemoveClient(id);
|
||||
@@ -557,7 +557,7 @@ void EntityList::AddGroup(Group *group)
|
||||
|
||||
uint32 gid = worldserver.NextGroupID();
|
||||
if (gid == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error,
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error,
|
||||
"Unable to get new group ID from world server. group is going to be broken.");
|
||||
return;
|
||||
}
|
||||
@@ -586,7 +586,7 @@ void EntityList::AddRaid(Raid *raid)
|
||||
|
||||
uint32 gid = worldserver.NextGroupID();
|
||||
if (gid == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error,
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error,
|
||||
"Unable to get new group ID from world server. group is going to be broken.");
|
||||
return;
|
||||
}
|
||||
@@ -2509,7 +2509,7 @@ char *EntityList::MakeNameUnique(char *name)
|
||||
return name;
|
||||
}
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Fatal error in EntityList::MakeNameUnique: Unable to find unique name for '%s'", name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Fatal error in EntityList::MakeNameUnique: Unable to find unique name for '%s'", name);
|
||||
char tmp[64] = "!";
|
||||
strn0cpy(&tmp[1], name, sizeof(tmp) - 1);
|
||||
strcpy(name, tmp);
|
||||
@@ -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))) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Reloading Task State For Client %s", client->GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Reloading Task State For Client %s", client->GetName());
|
||||
client->RemoveClientTaskState();
|
||||
client->LoadClientTaskState();
|
||||
taskmanager->SendActiveTasksToClient(client);
|
||||
|
||||
+4
-4
@@ -240,7 +240,7 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) {
|
||||
}
|
||||
|
||||
void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Attempting to Set Exp for %s (XP: %u, AAXP: %u, Rez: %s)", this->GetCleanName(), set_exp, set_aaxp, isrezzexp ? "true" : "false");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Attempting to Set Exp for %s (XP: %u, AAXP: %u, Rez: %s)", this->GetCleanName(), set_exp, set_aaxp, isrezzexp ? "true" : "false");
|
||||
//max_AAXP = GetEXPForLevel(52) - GetEXPForLevel(51); //GetEXPForLevel() doesn't depend on class/race, just level, so it shouldn't change between Clients
|
||||
max_AAXP = RuleI(AA, ExpPerPoint); //this may be redundant since we're doing this in Client::FinishConnState2()
|
||||
if (max_AAXP == 0 || GetEXPForLevel(GetLevel()) == 0xFFFFFFFF) {
|
||||
@@ -308,7 +308,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
|
||||
//figure out how many AA points we get from the exp were setting
|
||||
m_pp.aapoints = set_aaxp / max_AAXP;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Calculating additional AA Points from AAXP for %s: %u / %u = %.1f points", this->GetCleanName(), set_aaxp, max_AAXP, (float)set_aaxp / (float)max_AAXP);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Calculating additional AA Points from AAXP for %s: %u / %u = %.1f points", this->GetCleanName(), set_aaxp, max_AAXP, (float)set_aaxp / (float)max_AAXP);
|
||||
|
||||
//get remainder exp points, set in PP below
|
||||
set_aaxp = set_aaxp - (max_AAXP * m_pp.aapoints);
|
||||
@@ -430,7 +430,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
void Client::SetLevel(uint8 set_level, bool command)
|
||||
{
|
||||
if (GetEXPForLevel(set_level) == 0xFFFFFFFF) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::SetLevel() GetEXPForLevel(%i) = 0xFFFFFFFF", set_level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::SetLevel() GetEXPForLevel(%i) = 0xFFFFFFFF", set_level);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ void Client::SetLevel(uint8 set_level, bool command)
|
||||
safe_delete(outapp);
|
||||
this->SendAppearancePacket(AT_WhoLevel, set_level); // who level change
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Setting Level for %s to %i", GetName(), set_level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Setting Level for %s to %i", GetName(), set_level);
|
||||
|
||||
CalcBonuses();
|
||||
|
||||
|
||||
+2
-2
@@ -167,11 +167,11 @@ void Mob::CalculateNewFearpoint()
|
||||
fear_walkto_z = Loc.z;
|
||||
curfp = true;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, Loc.x, Loc.y, Loc.z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, Loc.x, Loc.y, Loc.z);
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "No path found to selected node. Falling through to old fear point selection.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "No path found to selected node. Falling through to old fear point selection.");
|
||||
}
|
||||
|
||||
int loop = 0;
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@ uint32 ZoneDatabase::GetZoneForage(uint32 ZoneID, uint8 skill) {
|
||||
"LIMIT %i", ZoneID, skill, FORAGE_ITEM_LIMIT);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Forage query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Forage query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ uint32 ZoneDatabase::GetZoneForage(uint32 ZoneID, uint8 skill) {
|
||||
|
||||
item[index] = atoi(row[0]);
|
||||
chance[index] = atoi(row[1]) + chancepool;
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Possible Forage: %d with a %d chance", item[index], chance[index]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Possible Forage: %d with a %d chance", item[index], chance[index]);
|
||||
chancepool = chance[index];
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ void Client::ForageItem(bool guarantee) {
|
||||
const Item_Struct* food_item = database.GetItem(foragedfood);
|
||||
|
||||
if(!food_item) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "nullptr returned from database.GetItem in ClientForageItem");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "nullptr returned from database.GetItem in ClientForageItem");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -768,7 +768,7 @@ void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
|
||||
caster->SpellOnTarget(spell_id, members[z]->GetPet());
|
||||
#endif
|
||||
} else
|
||||
Log.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());
|
||||
Log.DoLog(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
|
||||
Log.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());
|
||||
Log.DoLog(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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1069,7 +1069,7 @@ bool Group::LearnMembers() {
|
||||
return false;
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ void Group::VerifyGroup() {
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (membername[i][0] == '\0') {
|
||||
#if EQDEBUG >= 7
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Group %lu: Verify %d: Empty.\n", (unsigned long)GetID(), i);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Group %lu: Verify %d: Empty.\n", (unsigned long)GetID(), i);
|
||||
#endif
|
||||
members[i] = nullptr;
|
||||
continue;
|
||||
@@ -1107,7 +1107,7 @@ void Group::VerifyGroup() {
|
||||
Mob *them = entity_list.GetMob(membername[i]);
|
||||
if(them == nullptr && members[i] != nullptr) { //they aren't in zone
|
||||
#if EQDEBUG >= 6
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' has disappeared!!", (unsigned long)GetID(), membername[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' has disappeared!!", (unsigned long)GetID(), membername[i]);
|
||||
#endif
|
||||
membername[i][0] = '\0';
|
||||
members[i] = nullptr;
|
||||
@@ -1116,13 +1116,13 @@ void Group::VerifyGroup() {
|
||||
|
||||
if(them != nullptr && members[i] != them) { //our pointer is out of date... not so good.
|
||||
#if EQDEBUG >= 5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' had an out of date pointer!!", (unsigned long)GetID(), membername[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' had an out of date pointer!!", (unsigned long)GetID(), membername[i]);
|
||||
#endif
|
||||
members[i] = them;
|
||||
continue;
|
||||
}
|
||||
#if EQDEBUG >= 8
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' is valid.", (unsigned long)GetID(), membername[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' is valid.", (unsigned long)GetID(), membername[i]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1457,7 +1457,7 @@ void Group::DelegateMainTank(const char *NewMainTankName, uint8 toggle)
|
||||
MainTankName.c_str(), GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main tank: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main tank: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1503,7 +1503,7 @@ void Group::DelegateMainAssist(const char *NewMainAssistName, uint8 toggle)
|
||||
MainAssistName.c_str(), GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main assist: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main assist: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1550,7 +1550,7 @@ void Group::DelegatePuller(const char *NewPullerName, uint8 toggle)
|
||||
PullerName.c_str(), GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main puller: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main puller: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -1701,7 +1701,7 @@ void Group::UnDelegateMainTank(const char *OldMainTankName, uint8 toggle)
|
||||
std::string query = StringFormat("UPDATE group_leaders SET maintank = '' WHERE gid = %i LIMIT 1", GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
if(!toggle) {
|
||||
for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) {
|
||||
@@ -1750,7 +1750,7 @@ void Group::UnDelegateMainAssist(const char *OldMainAssistName, uint8 toggle)
|
||||
std::string query = StringFormat("UPDATE group_leaders SET assist = '' WHERE gid = %i LIMIT 1", GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main assist: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main assist: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
if(!toggle)
|
||||
{
|
||||
@@ -1778,7 +1778,7 @@ void Group::UnDelegatePuller(const char *OldPullerName, uint8 toggle)
|
||||
std::string query = StringFormat("UPDATE group_leaders SET puller = '' WHERE gid = %i LIMIT 1", GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main puller: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main puller: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
if(!toggle) {
|
||||
for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) {
|
||||
@@ -1861,7 +1861,7 @@ void Group::SetGroupMentor(int percent, char *name)
|
||||
mentoree_name.c_str(), mentor_percent, GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Group::ClearGroupMentor()
|
||||
@@ -1872,7 +1872,7 @@ void Group::ClearGroupMentor()
|
||||
std::string query = StringFormat("UPDATE group_leaders SET mentoree = '', mentor_percent = 0 WHERE gid = %i LIMIT 1", GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Group::NotifyAssistTarget(Client *c)
|
||||
@@ -1942,7 +1942,7 @@ void Group::DelegateMarkNPC(const char *NewNPCMarkerName)
|
||||
NewNPCMarkerName, GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mark npc: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mark npc: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Group::NotifyMarkNPC(Client *c)
|
||||
@@ -2023,7 +2023,7 @@ void Group::UnDelegateMarkNPC(const char *OldNPCMarkerName)
|
||||
std::string query = StringFormat("UPDATE group_leaders SET marknpc = '' WHERE gid = %i LIMIT 1", GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -2040,7 +2040,7 @@ void Group::SaveGroupLeaderAA()
|
||||
safe_delete_array(queryBuffer);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -56,7 +56,7 @@ void Client::SendGuildMOTD(bool GetGuildMOTDReply) {
|
||||
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_GuildMOTD of length %d", outapp->size);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_GuildMOTD of length %d", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
@@ -144,10 +144,10 @@ void Client::SendGuildSpawnAppearance() {
|
||||
if (!IsInAGuild()) {
|
||||
// clear guildtag
|
||||
SendAppearancePacket(AT_GuildID, GUILD_NONE);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending spawn appearance for no guild tag.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending spawn appearance for no guild tag.");
|
||||
} else {
|
||||
uint8 rank = guild_mgr.GetDisplayedRank(GuildID(), GuildRank(), CharacterID());
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending spawn appearance for guild %d at rank %d", GuildID(), rank);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending spawn appearance for guild %d at rank %d", GuildID(), rank);
|
||||
SendAppearancePacket(AT_GuildID, GuildID());
|
||||
if(GetClientVersion() >= EQClientRoF)
|
||||
{
|
||||
@@ -171,11 +171,11 @@ void Client::SendGuildList() {
|
||||
//ask the guild manager to build us a nice guild list packet
|
||||
outapp->pBuffer = guild_mgr.MakeGuildList(/*GetName()*/"", outapp->size);
|
||||
if(outapp->pBuffer == nullptr) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Unable to make guild list!");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Unable to make guild list!");
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_ZoneGuildList of length %d", outapp->size);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_ZoneGuildList of length %d", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
@@ -192,7 +192,7 @@ void Client::SendGuildMembers() {
|
||||
outapp->pBuffer = data;
|
||||
data = nullptr;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_GuildMemberList of length %d", outapp->size);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_GuildMemberList of length %d", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
@@ -223,7 +223,7 @@ void Client::RefreshGuildInfo()
|
||||
|
||||
CharGuildInfo info;
|
||||
if(!guild_mgr.GetCharInfo(CharacterID(), info)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Unable to obtain guild char info for %s (%d)", GetName(), CharacterID());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Unable to obtain guild char info for %s (%d)", GetName(), CharacterID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ void Client::SendGuildJoin(GuildJoin_Struct* gj){
|
||||
outgj->rank = gj->rank;
|
||||
outgj->zoneid = gj->zoneid;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_GuildManageAdd for join of length %d", outapp->size);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending OP_GuildManageAdd for join of length %d", outapp->size);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
@@ -409,7 +409,7 @@ bool ZoneDatabase::CheckGuildDoor(uint8 doorid, uint16 guild_id, const char* zon
|
||||
doorid-128, zone);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CheckGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CheckGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ bool ZoneDatabase::SetGuildDoor(uint8 doorid,uint16 guild_id, const char* zone)
|
||||
guild_id, doorid, zone);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SetGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SetGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+24
-24
@@ -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) {
|
||||
Log.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);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Guild lookup for char %d when sending char refresh.", charid);
|
||||
Log.DoLog(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
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending char refresh for %d from guild %d to world", charid, guild_id);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Sending guild delete for guild %d to world", guild_id);
|
||||
Log.DoLog(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;
|
||||
@@ -261,12 +261,12 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
switch(pack->opcode) {
|
||||
case ServerOP_RefreshGuild: {
|
||||
if(pack->size != sizeof(ServerGuildRefresh_Struct)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRefresh_Struct));
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRefresh_Struct));
|
||||
return;
|
||||
}
|
||||
ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer;
|
||||
|
||||
Log.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);
|
||||
Log.DoLog(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);
|
||||
@@ -295,12 +295,12 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
|
||||
case ServerOP_GuildCharRefresh: {
|
||||
if(pack->size != sizeof(ServerGuildCharRefresh_Struct)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildCharRefresh_Struct));
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildCharRefresh_Struct));
|
||||
return;
|
||||
}
|
||||
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild member refresh from world for char %d from guild %d", s->char_id, s->guild_id);
|
||||
Log.DoLog(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);
|
||||
|
||||
@@ -338,7 +338,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
{
|
||||
if(pack->size != sizeof(ServerGuildRankUpdate_Struct))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RankUpdate of incorrect size %d, expected %d",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RankUpdate of incorrect size %d, expected %d",
|
||||
pack->size, sizeof(ServerGuildRankUpdate_Struct));
|
||||
|
||||
return;
|
||||
@@ -364,12 +364,12 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
|
||||
case ServerOP_DeleteGuild: {
|
||||
if(pack->size != sizeof(ServerGuildID_Struct)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_DeleteGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildID_Struct));
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_DeleteGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildID_Struct));
|
||||
return;
|
||||
}
|
||||
ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds, "Received guild delete from world for guild %d", s->guild_id);
|
||||
Log.DoLog(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())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Invalid Client or not in guild. ID=%i", FromID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Invalid Client or not in guild. ID=%i", FromID);
|
||||
break;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Processing ServerOP_OnlineGuildMembersResponse");
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Guilds,"Sending OP_GuildMemberUpdate to %i. Name=%s ZoneID=%i",FromID,Name,gmus->ZoneID);
|
||||
c->QueuePacket(outapp);
|
||||
}
|
||||
safe_delete(outapp);
|
||||
@@ -603,7 +603,7 @@ bool GuildBankManager::Load(uint32 guildID)
|
||||
"FROM `guild_bank` WHERE `guildid` = %i", guildID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading guild bank: %s, %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading guild bank: %s, %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ void GuildBankManager::SendGuildBank(Client *c)
|
||||
|
||||
if(Iterator == Banks.end())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", c->GuildID());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", c->GuildID());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -800,7 +800,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
|
||||
|
||||
if(Iterator == Banks.end())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", GuildID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", GuildID);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -846,7 +846,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
|
||||
|
||||
if(Slot < 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "No space to add item to the guild bank.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "No space to add item to the guild bank.");
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -857,7 +857,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
|
||||
GuildID, Area, Slot, ItemID, QtyOrCharges, Donator, Permissions, WhoFor);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Insert Error: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Insert Error: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -922,7 +922,7 @@ int GuildBankManager::Promote(uint32 guildID, int slotID)
|
||||
"LIMIT 1", mainSlot, guildID, slotID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "error promoting item: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "error promoting item: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ void GuildBankManager::SetPermissions(uint32 guildID, uint16 slotID, uint32 perm
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "error changing permissions: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "error changing permissions: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1124,7 +1124,7 @@ bool GuildBankManager::DeleteItem(uint32 guildID, uint16 area, uint16 slotID, ui
|
||||
guildID, area, slotID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Delete item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Delete item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1136,7 +1136,7 @@ bool GuildBankManager::DeleteItem(uint32 guildID, uint16 area, uint16 slotID, ui
|
||||
BankArea[slotID].Quantity - quantity, guildID, area, slotID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Update item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Update item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1299,7 +1299,7 @@ void GuildBankManager::UpdateItemQuantity(uint32 guildID, uint16 area, uint16 sl
|
||||
quantity, guildID, area, slotID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Update item quantity failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Update item quantity failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -73,12 +73,12 @@ const NPCType *Horse::BuildHorseType(uint16 spell_id) {
|
||||
std::string query = StringFormat("SELECT race, gender, texture, mountspeed FROM horses WHERE filename = '%s'", fileName);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Mount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Mount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "No Database entry for mount: %s, check the horses table", fileName);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "No Database entry for mount: %s, check the horses table", fileName);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ void Client::SummonHorse(uint16 spell_id) {
|
||||
return;
|
||||
}
|
||||
if(!Horse::IsHorseSpell(spell_id)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s tried to summon an unknown horse, spell id %d", GetName(), spell_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "%s tried to summon an unknown horse, spell id %d", GetName(), spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+77
-77
@@ -200,7 +200,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// make sure the item exists
|
||||
if(item == nullptr) {
|
||||
Message(13, "Item %u does not exist.", item_id);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item_id, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -215,7 +215,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check to make sure we are augmenting an augmentable item
|
||||
else if (((item->ItemClass != ItemClassCommon) || (item->AugType > 0)) && (aug1 | aug2 | aug3 | aug4 | aug5 | aug6)) {
|
||||
Message(13, "You can not augment an augment or a non-common class item.");
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an augment or a non-common class item.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug5: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an augment or a non-common class item.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug5: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -229,7 +229,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
/*
|
||||
else if(item->MinStatus && ((this->Admin() < item->MinStatus) || (this->Admin() < RuleI(GM, MinStatusToSummonItem)))) {
|
||||
Message(13, "You are not a GM or do not have the status to summon this item.");
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create a GM-only item with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u, MinStatus: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create a GM-only item with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u, MinStatus: %u)\n",
|
||||
GetName(), account_name, this->Admin(), item->ID, aug1, aug2, aug3, aug4, aug5, aug6, item->MinStatus);
|
||||
|
||||
return false;
|
||||
@@ -252,7 +252,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
if(augtest == nullptr) {
|
||||
if(augments[iter]) {
|
||||
Message(13, "Augment %u (Aug%i) does not exist.", augments[iter], iter + 1);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an augment (Aug%i) with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an augment (Aug%i) with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -269,7 +269,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check that augment is an actual augment
|
||||
else if(augtest->AugType == 0) {
|
||||
Message(13, "%s (%u) (Aug%i) is not an actual augment.", augtest->Name, augtest->ID, iter + 1);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to use a non-augment item (Aug%i) as an augment.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to use a non-augment item (Aug%i) as an augment.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, (iter + 1), aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -281,7 +281,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
/*
|
||||
else if(augtest->MinStatus && ((this->Admin() < augtest->MinStatus) || (this->Admin() < RuleI(GM, MinStatusToSummonItem)))) {
|
||||
Message(13, "You are not a GM or do not have the status to summon this augment.");
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create a GM-only augment (Aug%i) with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, MinStatus: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create a GM-only augment (Aug%i) with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, MinStatus: %u)\n",
|
||||
GetName(), account_name, (iter + 1), this->Admin(), item->ID, aug1, aug2, aug3, aug4, aug5, aug6, item->MinStatus);
|
||||
|
||||
return false;
|
||||
@@ -292,7 +292,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
if(enforcewear) {
|
||||
if((item->AugSlotType[iter] == AugTypeNone) || !(((uint32)1 << (item->AugSlotType[iter] - 1)) & augtest->AugType)) {
|
||||
Message(13, "Augment %u (Aug%i) is not acceptable wear on Item %u.", augments[iter], iter + 1, item->ID);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an item with an unacceptable augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an item with an unacceptable augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -300,7 +300,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
if(item->AugSlotVisible[iter] == 0) {
|
||||
Message(13, "Item %u has not evolved enough to accept Augment %u (Aug%i).", item->ID, augments[iter], iter + 1);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an unevolved item with augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an unevolved item with augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -477,7 +477,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
if(restrictfail) {
|
||||
Message(13, "Augment %u (Aug%i) is restricted from wear on Item %u.", augments[iter], (iter + 1), item->ID);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an item with a restricted augment (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to augment an item with a restricted augment (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -488,7 +488,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check for class usability
|
||||
if(item->Classes && !(classes &= augtest->Classes)) {
|
||||
Message(13, "Augment %u (Aug%i) will result in an item not usable by any class.", augments[iter], (iter + 1));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item unusable by any class.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item unusable by any class.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -497,7 +497,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check for race usability
|
||||
if(item->Races && !(races &= augtest->Races)) {
|
||||
Message(13, "Augment %u (Aug%i) will result in an item not usable by any race.", augments[iter], (iter + 1));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item unusable by any race.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item unusable by any race.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -506,7 +506,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// check for slot usability
|
||||
if(item->Slots && !(slots &= augtest->Slots)) {
|
||||
Message(13, "Augment %u (Aug%i) will result in an item not usable in any slot.", augments[iter], (iter + 1));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item unusable in any slot.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to create an item unusable in any slot.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -533,7 +533,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
if(inst == nullptr) {
|
||||
Message(13, "An unknown server error has occurred and your item was not created.");
|
||||
// this goes to logfile since this is a major error
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
return false;
|
||||
@@ -559,7 +559,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
if(!(slots & ((uint32)1 << slottest))) {
|
||||
Message(0, "This item is not equipable at slot %u - moving to cursor.", to_slot);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to equip an item unusable in slot %u - moved to cursor.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Player %s on account %s attempted to equip an item unusable in slot %u - moved to cursor.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
|
||||
GetName(), account_name, to_slot, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
|
||||
to_slot = MainCursor;
|
||||
@@ -700,7 +700,7 @@ void Client::SendCursorBuffer() {
|
||||
// Remove item from inventory
|
||||
void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_update, bool update_db) {
|
||||
#if (EQDEBUG >= 5)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "DeleteItemInInventory(%i, %i, %s)", slot_id, quantity, (client_update) ? "true":"false");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "DeleteItemInInventory(%i, %i, %s)", slot_id, quantity, (client_update) ? "true":"false");
|
||||
#endif
|
||||
|
||||
// Added 'IsSlotValid(slot_id)' check to both segments of client packet processing.
|
||||
@@ -815,7 +815,7 @@ void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_upd
|
||||
|
||||
bool Client::PushItemOnCursor(const ItemInst& inst, bool client_update)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting item %s (%d) on the cursor", inst.GetItem()->Name, inst.GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting item %s (%d) on the cursor", inst.GetItem()->Name, inst.GetItem()->ID);
|
||||
m_inv.PushCursor(inst);
|
||||
|
||||
if (client_update) {
|
||||
@@ -831,7 +831,7 @@ bool Client::PushItemOnCursor(const ItemInst& inst, bool client_update)
|
||||
// (Also saves changes back to the database: this may be optimized in the future)
|
||||
// client_update: Sends packet to client
|
||||
bool Client::PutItemInInventory(int16 slot_id, const ItemInst& inst, bool client_update) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
|
||||
if (slot_id == MainCursor)
|
||||
return PushItemOnCursor(inst, client_update);
|
||||
@@ -858,7 +858,7 @@ bool Client::PutItemInInventory(int16 slot_id, const ItemInst& inst, bool client
|
||||
|
||||
void Client::PutLootInInventory(int16 slot_id, const ItemInst &inst, ServerLootItem_Struct** bag_item_data)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting loot item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting loot item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
|
||||
m_inv.PutItem(slot_id, inst);
|
||||
|
||||
SendLootItemInPacket(&inst, slot_id);
|
||||
@@ -879,7 +879,7 @@ void Client::PutLootInInventory(int16 slot_id, const ItemInst &inst, ServerLootI
|
||||
continue;
|
||||
const ItemInst *bagitem = database.CreateItem(bag_item_data[i]->item_id, bag_item_data[i]->charges, bag_item_data[i]->aug_1, bag_item_data[i]->aug_2, bag_item_data[i]->aug_3, bag_item_data[i]->aug_4, bag_item_data[i]->aug_5, bag_item_data[i]->aug_6, bag_item_data[i]->attuned);
|
||||
interior_slot = Inventory::CalcSlotId(slot_id, i);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting bag loot item %s (%d) into slot %d (bag slot %d)", inst.GetItem()->Name, inst.GetItem()->ID, interior_slot, i);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Putting bag loot item %s (%d) into slot %d (bag slot %d)", inst.GetItem()->Name, inst.GetItem()->ID, interior_slot, i);
|
||||
PutLootInInventory(interior_slot, *bagitem);
|
||||
safe_delete(bagitem);
|
||||
}
|
||||
@@ -1313,7 +1313,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// SoF+ sends a Unix timestamp (should be int32) for src and dst slots every 10 minutes for some reason.
|
||||
if(src_slot_check < 2147483647)
|
||||
Message(13, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// SoF+ sends a Unix timestamp (should be int32) for src and dst slots every 10 minutes for some reason.
|
||||
if(src_slot_check < 2147483647)
|
||||
Message(13, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1334,7 +1334,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
|
||||
if (move_in->to_slot == (uint32)INVALID_INDEX) {
|
||||
if (move_in->from_slot == (uint32)MainCursor) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Client destroyed item from cursor slot %d", move_in->from_slot);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Client destroyed item from cursor slot %d", move_in->from_slot);
|
||||
if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit
|
||||
|
||||
ItemInst *inst = m_inv.GetItem(MainCursor);
|
||||
@@ -1348,7 +1348,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
return true; // Item destroyed by client
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Deleted item from slot %d as a result of an inventory container tradeskill combine.", move_in->from_slot);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Deleted item from slot %d as a result of an inventory container tradeskill combine.", move_in->from_slot);
|
||||
if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit
|
||||
DeleteItemInInventory(move_in->from_slot);
|
||||
return true; // Item deletion
|
||||
@@ -1388,7 +1388,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
ItemInst* src_inst = m_inv.GetItem(src_slot_id);
|
||||
ItemInst* dst_inst = m_inv.GetItem(dst_slot_id);
|
||||
if (src_inst){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Src slot %d has item %s (%d) with %d charges in it.", src_slot_id, src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_inst->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Src slot %d has item %s (%d) with %d charges in it.", src_slot_id, src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_inst->GetCharges());
|
||||
srcitemid = src_inst->GetItem()->ID;
|
||||
//SetTint(dst_slot_id,src_inst->GetColor());
|
||||
if (src_inst->GetCharges() > 0 && (src_inst->GetCharges() < (int16)move_in->number_in_stack || move_in->number_in_stack > src_inst->GetItem()->StackSize))
|
||||
@@ -1398,7 +1398,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
}
|
||||
if (dst_inst) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Dest slot %d has item %s (%d) with %d charges in it.", dst_slot_id, dst_inst->GetItem()->Name, dst_inst->GetItem()->ID, dst_inst->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Dest slot %d has item %s (%d) with %d charges in it.", dst_slot_id, dst_inst->GetItem()->Name, dst_inst->GetItem()->ID, dst_inst->GetCharges());
|
||||
dstitemid = dst_inst->GetItem()->ID;
|
||||
}
|
||||
if (Trader && srcitemid>0){
|
||||
@@ -1435,7 +1435,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
move_in->from_slot = dst_slot_check;
|
||||
move_in->to_slot = src_slot_check;
|
||||
move_in->number_in_stack = dst_inst->GetCharges();
|
||||
if(!SwapItem(move_in)) { Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Recursive SwapItem call failed due to non-existent destination item (charid: %i, fromslot: %i, toslot: %i)", CharacterID(), src_slot_id, dst_slot_id); }
|
||||
if(!SwapItem(move_in)) { Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Recursive SwapItem call failed due to non-existent destination item (charid: %i, fromslot: %i, toslot: %i)", CharacterID(), src_slot_id, dst_slot_id); }
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1443,7 +1443,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
//verify shared bank transactions in the database
|
||||
if(src_inst && src_slot_id >= EmuConstants::SHARED_BANK_BEGIN && src_slot_id <= EmuConstants::SHARED_BANK_BAGS_END) {
|
||||
if(!database.VerifyInventory(account_id, src_slot_id, src_inst)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name);
|
||||
DeleteItemInInventory(dst_slot_id,0,true);
|
||||
return(false);
|
||||
}
|
||||
@@ -1458,7 +1458,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
if(dst_inst && dst_slot_id >= EmuConstants::SHARED_BANK_BEGIN && dst_slot_id <= EmuConstants::SHARED_BANK_BAGS_END) {
|
||||
if(!database.VerifyInventory(account_id, dst_slot_id, dst_inst)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name);
|
||||
DeleteItemInInventory(src_slot_id,0,true);
|
||||
return(false);
|
||||
}
|
||||
@@ -1577,7 +1577,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
return false;
|
||||
}
|
||||
if (with) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Trade item move from slot %d to slot %d (trade with %s)", src_slot_id, dst_slot_id, with->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Trade item move from slot %d to slot %d (trade with %s)", src_slot_id, dst_slot_id, with->GetName());
|
||||
// Fill Trade list with items from cursor
|
||||
if (!m_inv[MainCursor]) {
|
||||
Message(13, "Error: Cursor item not located on server!");
|
||||
@@ -1610,18 +1610,18 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if (move_in->number_in_stack > 0) {
|
||||
// Determine if charged items can stack
|
||||
if(src_inst && !src_inst->IsStackable()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. %s is not a stackable item. (charname: %s)", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetItem()->Name, GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. %s is not a stackable item. (charname: %s)", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetItem()->Name, GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dst_inst) {
|
||||
if(src_inst->GetID() != dst_inst->GetID()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. Incompatible item types: %d != %d", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetID(), dst_inst->GetID());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. Incompatible item types: %d != %d", src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetID(), dst_inst->GetID());
|
||||
return(false);
|
||||
}
|
||||
if(dst_inst->GetCharges() < dst_inst->GetItem()->StackSize) {
|
||||
//we have a chance of stacking.
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. dest has %d/%d charges", src_slot_id, dst_slot_id, move_in->number_in_stack, dst_inst->GetCharges(), dst_inst->GetItem()->StackSize);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. dest has %d/%d charges", src_slot_id, dst_slot_id, move_in->number_in_stack, dst_inst->GetCharges(), dst_inst->GetItem()->StackSize);
|
||||
// Charges can be emptied into dst
|
||||
uint16 usedcharges = dst_inst->GetItem()->StackSize - dst_inst->GetCharges();
|
||||
if (usedcharges > move_in->number_in_stack)
|
||||
@@ -1633,15 +1633,15 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// Depleted all charges?
|
||||
if (src_inst->GetCharges() < 1)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Dest (%d) now has %d charges, source (%d) was entirely consumed. (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, usedcharges);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Dest (%d) now has %d charges, source (%d) was entirely consumed. (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, usedcharges);
|
||||
database.SaveInventory(CharacterID(),nullptr,src_slot_id);
|
||||
m_inv.DeleteItem(src_slot_id);
|
||||
all_to_stack = true;
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Dest (%d) now has %d charges, source (%d) has %d (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, src_inst->GetCharges(), usedcharges);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Dest (%d) now has %d charges, source (%d) has %d (%d moved)", dst_slot_id, dst_inst->GetCharges(), src_slot_id, src_inst->GetCharges(), usedcharges);
|
||||
}
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. Exceeds dest maximum stack size: %d/%d", src_slot_id, dst_slot_id, move_in->number_in_stack, (src_inst->GetCharges()+dst_inst->GetCharges()), dst_inst->GetItem()->StackSize);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move from %d to %d with stack size %d. Exceeds dest maximum stack size: %d/%d", src_slot_id, dst_slot_id, move_in->number_in_stack, (src_inst->GetCharges()+dst_inst->GetCharges()), dst_inst->GetItem()->StackSize);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1650,12 +1650,12 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if ((int16)move_in->number_in_stack >= src_inst->GetCharges()) {
|
||||
// Move entire stack
|
||||
if(!m_inv.SwapItem(src_slot_id, dst_slot_id)) { return false; }
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move entire stack from %d to %d with stack size %d. Dest empty.", src_slot_id, dst_slot_id, move_in->number_in_stack);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Move entire stack from %d to %d with stack size %d. Dest empty.", src_slot_id, dst_slot_id, move_in->number_in_stack);
|
||||
}
|
||||
else {
|
||||
// Split into two
|
||||
src_inst->SetCharges(src_inst->GetCharges() - move_in->number_in_stack);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Split stack of %s (%d) from slot %d to %d with stack size %d. Src keeps %d.", src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Split stack of %s (%d) from slot %d to %d with stack size %d. Src keeps %d.", src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetCharges());
|
||||
ItemInst* inst = database.CreateItem(src_inst->GetItem(), move_in->number_in_stack);
|
||||
m_inv.PutItem(dst_slot_id, *inst);
|
||||
safe_delete(inst);
|
||||
@@ -1680,7 +1680,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
SetMaterial(dst_slot_id,src_inst->GetItem()->ID);
|
||||
}
|
||||
if(!m_inv.SwapItem(src_slot_id, dst_slot_id)) { return false; }
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id);
|
||||
|
||||
if(src_slot_id <= EmuConstants::EQUIPMENT_END || src_slot_id == MainPowerSource) {
|
||||
if(src_inst) {
|
||||
@@ -1739,7 +1739,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
|
||||
|
||||
// resync the 'from' and 'to' slots on an as-needed basis
|
||||
// Not as effective as the full process, but less intrusive to gameplay -U
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot);
|
||||
Message(15, "Inventory Desyncronization detected: Resending slot data...");
|
||||
|
||||
if((move_slots->from_slot >= EmuConstants::EQUIPMENT_BEGIN && move_slots->from_slot <= EmuConstants::CURSOR_BAG_END) || move_slots->from_slot == MainPowerSource) {
|
||||
@@ -2071,7 +2071,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for(slot_id = EmuConstants::EQUIPMENT_BEGIN; slot_id <= EmuConstants::EQUIPMENT_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, client_update);
|
||||
}
|
||||
}
|
||||
@@ -2080,7 +2080,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for (slot_id = EmuConstants::GENERAL_BEGIN; slot_id <= EmuConstants::GENERAL_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if (inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, client_update);
|
||||
}
|
||||
}
|
||||
@@ -2089,7 +2089,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
if (m_inv[MainPowerSource]) {
|
||||
const ItemInst* inst = m_inv[MainPowerSource];
|
||||
if (inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, MainPowerSource);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, MainPowerSource);
|
||||
DeleteItemInInventory(MainPowerSource, 0, (GetClientVersion() >= EQClientSoF) ? client_update : false); // Ti slot non-existent
|
||||
}
|
||||
}
|
||||
@@ -2098,7 +2098,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for(slot_id = EmuConstants::GENERAL_BAGS_BEGIN; slot_id <= EmuConstants::CURSOR_BAG_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, client_update);
|
||||
}
|
||||
}
|
||||
@@ -2107,7 +2107,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for(slot_id = EmuConstants::BANK_BEGIN; slot_id <= EmuConstants::BANK_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Bank slots
|
||||
}
|
||||
}
|
||||
@@ -2116,7 +2116,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for(slot_id = EmuConstants::BANK_BAGS_BEGIN; slot_id <= EmuConstants::BANK_BAGS_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Bank Container slots
|
||||
}
|
||||
}
|
||||
@@ -2125,7 +2125,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for(slot_id = EmuConstants::SHARED_BANK_BEGIN; slot_id <= EmuConstants::SHARED_BANK_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Shared Bank slots
|
||||
}
|
||||
}
|
||||
@@ -2134,7 +2134,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
for(slot_id = EmuConstants::SHARED_BANK_BAGS_BEGIN; slot_id <= EmuConstants::SHARED_BANK_BAGS_END; slot_id++) {
|
||||
const ItemInst* inst = m_inv[slot_id];
|
||||
if(inst && !inst->GetItem()->NoRent) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
DeleteItemInInventory(slot_id, 0, false); // Can't delete from client Shared Bank Container slots
|
||||
}
|
||||
}
|
||||
@@ -2155,7 +2155,7 @@ void Client::RemoveNoRent(bool client_update) {
|
||||
inst = *iter;
|
||||
// should probably put a check here for valid pointer..but, that was checked when the item was put into inventory -U
|
||||
if (!inst->GetItem()->NoRent)
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "NoRent Timer Lapse: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
else
|
||||
m_inv.PushCursor(**iter);
|
||||
|
||||
@@ -2178,7 +2178,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2193,7 +2193,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if (inst) {
|
||||
if (CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2208,7 +2208,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(MainPowerSource);
|
||||
if (inst) {
|
||||
if (CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, MainPowerSource);
|
||||
}
|
||||
else {
|
||||
@@ -2223,7 +2223,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2238,7 +2238,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2253,7 +2253,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
if(CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, slot_id);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
}
|
||||
else {
|
||||
@@ -2281,7 +2281,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
inst = *iter;
|
||||
// probably needs a valid pointer check -U
|
||||
if (CheckLoreConflict(inst->GetItem())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
safe_delete(*iter);
|
||||
iter = local.erase(iter);
|
||||
}
|
||||
@@ -2300,7 +2300,7 @@ void Client::RemoveDuplicateLore(bool client_update) {
|
||||
m_inv.PushCursor(**iter);
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Lore Duplication Error: Deleting %s from `Limbo`", inst->GetItem()->Name);
|
||||
}
|
||||
|
||||
safe_delete(*iter);
|
||||
@@ -2322,7 +2322,7 @@ void Client::MoveSlotNotAllowed(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, client_update);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
@@ -2335,7 +2335,7 @@ void Client::MoveSlotNotAllowed(bool client_update) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, (GetClientVersion() >= EQClientSoF) ? client_update : false);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
safe_delete(inst);
|
||||
@@ -2479,7 +2479,7 @@ void Client::CreateBandolier(const EQApplicationPacket *app) {
|
||||
|
||||
BandolierCreate_Struct *bs = (BandolierCreate_Struct*)app->pBuffer;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Creating Bandolier Set %i, Set Name: %s", GetName(), bs->number, bs->name);
|
||||
Log.DoLog(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();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s adding item %s to slot %i", GetName(),BaseItem->Name, WeaponSlot);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s no item in slot %i", GetName(), WeaponSlot);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s removing set", GetName(), bds->number);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s activating set %i", GetName(), bss->number);
|
||||
Log.DoLog(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,16 +2585,16 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
||||
else { // The player doesn't have the required weapon with them.
|
||||
BandolierItems[BandolierSlot] = 0;
|
||||
if (slot == INVALID_INDEX) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Character does not have required bandolier item for slot %i", WeaponSlot);
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "returning item %s in weapon slot %i to inventory",
|
||||
Log.DoLog(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);
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
|
||||
InvItem->GetItem()->Name);
|
||||
safe_delete(InvItem);
|
||||
}
|
||||
@@ -2629,7 +2629,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
||||
if(InvItem) {
|
||||
// If there was already an item in that weapon slot that we replaced, find a place to put it
|
||||
if(!MoveItemToInventory(InvItem))
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
|
||||
InvItem->GetItem()->Name);
|
||||
safe_delete(InvItem);
|
||||
}
|
||||
@@ -2640,13 +2640,13 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
|
||||
// put it in the player's inventory.
|
||||
ItemInst *InvItem = m_inv.PopItem(WeaponSlot);
|
||||
if(InvItem) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Bandolier has no item for slot %i, returning item %s to inventory",
|
||||
Log.DoLog(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))
|
||||
database.SaveInventory(character_id, 0, WeaponSlot);
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
|
||||
InvItem->GetItem()->Name);
|
||||
safe_delete(InvItem);
|
||||
}
|
||||
@@ -2677,7 +2677,7 @@ bool Client::MoveItemToInventory(ItemInst *ItemToReturn, bool UpdateClient) {
|
||||
|
||||
if(!ItemToReturn) return false;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory,"Char: %s Returning %s to inventory", GetName(), ItemToReturn->GetItem()->Name);
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Storing in main inventory slot %i", GetName(), i);
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s Storing in bag slot %i", GetName(), BaseSlotID + BagSlot);
|
||||
Log.DoLog(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
|
||||
//
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s No space, putting on the cursor", GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Inventory, "Char: %s No space, putting on the cursor", GetName());
|
||||
|
||||
PushItemOnCursor(*ItemToReturn, UpdateClient);
|
||||
|
||||
@@ -2865,8 +2865,8 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
|
||||
}
|
||||
|
||||
if (log) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::InterrogateInventory() -- End");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::InterrogateInventory() -- End");
|
||||
}
|
||||
if (!silent) {
|
||||
requester->Message(1, "Target interrogation flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
|
||||
@@ -2881,7 +2881,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
|
||||
void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 head, int16 index, const ItemInst* inst, const ItemInst* parent, bool log, bool silent, bool &error, int depth)
|
||||
{
|
||||
if (depth >= 10) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::InterrogateInventory_() - Recursion count has exceeded the maximum allowable (You have a REALLY BIG PROBLEM!!)");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::InterrogateInventory_() - Recursion count has exceeded the maximum allowable (You have a REALLY BIG PROBLEM!!)");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2910,7 +2910,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea
|
||||
else { e = ""; }
|
||||
|
||||
if (log)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s",
|
||||
head, depth, i.c_str(), p.c_str(), e.c_str());
|
||||
if (!silent)
|
||||
requester->Message(1, "%i:%i - inst: %s - parent: %s%s",
|
||||
|
||||
+2
-2
@@ -145,7 +145,7 @@ void ZoneDatabase::AddLootDropToNPC(NPC* npc,uint32 lootdrop_id, ItemList* iteml
|
||||
drop_chance = zone->random.Real(0.0, 100.0);
|
||||
|
||||
#if EQDEBUG>=11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Drop chance for npc: %s, this chance:%f, drop roll:%f", npc->GetName(), thischance, drop_chance);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Drop chance for npc: %s, this chance:%f, drop roll:%f", npc->GetName(), thischance, drop_chance);
|
||||
#endif
|
||||
if (thischance == 100.0 || drop_chance < thischance)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ void NPC::AddLootDrop(const Item_Struct *item2, ItemList* itemlist, int16 charge
|
||||
|
||||
ServerLootItem_Struct* item = new ServerLootItem_Struct;
|
||||
#if EQDEBUG>=11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Adding drop to npc: %s, Item: %i", GetName(), item2->ID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Adding drop to npc: %s, Item: %i", GetName(), item2->ID);
|
||||
#endif
|
||||
|
||||
EQApplicationPacket* outapp = nullptr;
|
||||
|
||||
+8
-8
@@ -885,7 +885,7 @@ int32 Merc::CalcMaxMana()
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Invalid Class '%c' in CalcMaxMana", GetCasterClass());
|
||||
max_mana = 0;
|
||||
break;
|
||||
}
|
||||
@@ -906,7 +906,7 @@ int32 Merc::CalcMaxMana()
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 11
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Merc::CalcMaxMana() called for %s - returning %d", GetName(), max_mana);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Merc::CalcMaxMana() called for %s - returning %d", GetName(), max_mana);
|
||||
#endif
|
||||
return max_mana;
|
||||
}
|
||||
@@ -1647,7 +1647,7 @@ void Merc::AI_Process() {
|
||||
if (AImovement_timer->Check())
|
||||
{
|
||||
if(!IsRooted()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName());
|
||||
CalculateNewPosition2(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed());
|
||||
return;
|
||||
}
|
||||
@@ -1766,7 +1766,7 @@ bool Merc::AI_EngagedCastCheck() {
|
||||
{
|
||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered (MERCS).");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered (MERCS).");
|
||||
|
||||
int8 mercClass = GetClass();
|
||||
|
||||
@@ -1873,7 +1873,7 @@ bool EntityList::Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance,
|
||||
// according to Rogean, Live NPCs will just cast through walls/floors, no problem..
|
||||
//
|
||||
// This check was put in to address an idle-mob CPU issue
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -4451,7 +4451,7 @@ bool Merc::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, boo
|
||||
{
|
||||
if (!other) {
|
||||
SetTarget(nullptr);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Merc::Attack() for evaluation!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Merc::Attack() for evaluation!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5986,7 +5986,7 @@ void NPC::LoadMercTypes() {
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6019,7 +6019,7 @@ void NPC::LoadMercs() {
|
||||
|
||||
if (!results.Success())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1576,7 +1576,7 @@ void Mob::SendIllusionPacket(uint16 in_race, uint8 in_gender, uint8 in_texture,
|
||||
|
||||
entity_list.QueueClients(this, outapp);
|
||||
safe_delete(outapp);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Illusion: Race = %i, Gender = %i, Texture = %i, HelmTexture = %i, HairColor = %i, BeardColor = %i, EyeColor1 = %i, EyeColor2 = %i, HairStyle = %i, Face = %i, DrakkinHeritage = %i, DrakkinTattoo = %i, DrakkinDetails = %i, Size = %f",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Illusion: Race = %i, Gender = %i, Texture = %i, HelmTexture = %i, HairColor = %i, BeardColor = %i, EyeColor1 = %i, EyeColor2 = %i, HairStyle = %i, Face = %i, DrakkinHeritage = %i, DrakkinTattoo = %i, DrakkinDetails = %i, Size = %f",
|
||||
race, gender, texture, helmtexture, haircolor, beardcolor, eyecolor1, eyecolor2, hairstyle, luclinface, drakkin_heritage, drakkin_tattoo, drakkin_details, size);
|
||||
}
|
||||
|
||||
@@ -3043,7 +3043,7 @@ void Mob::ExecWeaponProc(const ItemInst *inst, uint16 spell_id, Mob *on) {
|
||||
if(!IsValidSpell(spell_id)) { // Check for a valid spell otherwise it will crash through the function
|
||||
if(IsClient()){
|
||||
Message(0, "Invalid spell proc %u", spell_id);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Player %s, Weapon Procced invalid spell %u", this->GetName(), spell_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Player %s, Weapon Procced invalid spell %u", this->GetName(), spell_id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4536,7 +4536,7 @@ void Mob::MeleeLifeTap(int32 damage) {
|
||||
if(lifetap_amt && damage > 0){
|
||||
|
||||
lifetap_amt = damage * lifetap_amt / 100;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Melee lifetap healing for %d damage.", damage);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Melee lifetap healing for %d damage.", damage);
|
||||
|
||||
if (lifetap_amt > 0)
|
||||
HealDamage(lifetap_amt); //Heal self for modified damage amount.
|
||||
|
||||
+10
-10
@@ -355,7 +355,7 @@ bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float
|
||||
// according to Rogean, Live NPCs will just cast through walls/floors, no problem..
|
||||
//
|
||||
// This check was put in to address an idle-mob CPU issue
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -1404,7 +1404,7 @@ void Mob::AI_Process() {
|
||||
else if (AImovement_timer->Check())
|
||||
{
|
||||
if(!IsRooted()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", target->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", target->GetName());
|
||||
if(!RuleB(Pathing, Aggro) || !zone->pathing)
|
||||
CalculateNewPosition2(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed());
|
||||
else
|
||||
@@ -1639,7 +1639,7 @@ void NPC::AI_DoMovement() {
|
||||
roambox_movingto_y = zone->random.Real(roambox_min_y+1,roambox_max_y-1);
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)",
|
||||
roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, roambox_max_y, roambox_movingto_x, roambox_movingto_y);
|
||||
if (!CalculateNewPosition2(roambox_movingto_x, roambox_movingto_y, GetZ(), walksp, true))
|
||||
{
|
||||
@@ -1692,11 +1692,11 @@ void NPC::AI_DoMovement() {
|
||||
else {
|
||||
movetimercompleted=false;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "We are departing waypoint %d.", cur_wp);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "We are departing waypoint %d.", cur_wp);
|
||||
|
||||
//if we were under quest control (with no grid), we are done now..
|
||||
if(cur_wp == -2) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Non-grid quest mob has reached its quest ordered waypoint. Leaving pathing mode.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Non-grid quest mob has reached its quest ordered waypoint. Leaving pathing mode.");
|
||||
roamer = false;
|
||||
cur_wp = 0;
|
||||
}
|
||||
@@ -1727,7 +1727,7 @@ void NPC::AI_DoMovement() {
|
||||
{ // currently moving
|
||||
if (cur_wp_x == GetX() && cur_wp_y == GetY())
|
||||
{ // are we there yet? then stop
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid());
|
||||
SetWaypointPause();
|
||||
if(GetAppearance() != eaStanding)
|
||||
SetAppearance(eaStanding, false);
|
||||
@@ -1773,7 +1773,7 @@ void NPC::AI_DoMovement() {
|
||||
if (movetimercompleted==true)
|
||||
{ // time to pause has ended
|
||||
SetGrid( 0 - GetGrid()); // revert to AI control
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Quest pathing is finished. Resuming on grid %d", GetGrid());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Quest pathing is finished. Resuming on grid %d", GetGrid());
|
||||
|
||||
if(GetAppearance() != eaStanding)
|
||||
SetAppearance(eaStanding, false);
|
||||
@@ -1809,7 +1809,7 @@ void NPC::AI_DoMovement() {
|
||||
if (!CP2Moved)
|
||||
{
|
||||
if(moved) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Reached guard point (%.3f,%.3f,%.3f)", guard_x, guard_y, guard_z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Reached guard point (%.3f,%.3f,%.3f)", guard_x, guard_y, guard_z);
|
||||
ClearFeignMemory();
|
||||
moved=false;
|
||||
SetMoving(false);
|
||||
@@ -1934,7 +1934,7 @@ bool NPC::AI_EngagedCastCheck() {
|
||||
if (AIautocastspell_timer->Check(false)) {
|
||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells.");
|
||||
|
||||
// try casting a heal or gate
|
||||
if (!AICastSpell(this, AISpellVar.engaged_beneficial_self_chance, SpellType_Heal | SpellType_Escape | SpellType_InCombatBuff)) {
|
||||
@@ -1957,7 +1957,7 @@ bool NPC::AI_PursueCastCheck() {
|
||||
if (AIautocastspell_timer->Check(false)) {
|
||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
|
||||
if(!AICastSpell(GetTarget(), AISpellVar.pursue_detrimental_chance, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff)) {
|
||||
//no spell cast, try again soon.
|
||||
AIautocastspell_timer->Start(RandomTimer(AISpellVar.pursue_no_sp_recast_min, AISpellVar.pursue_no_sp_recast_max), false);
|
||||
|
||||
+54
-54
@@ -148,28 +148,28 @@ int main(int argc, char** argv) {
|
||||
worldserver.SetLauncherName("NONE");
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading server configuration..");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading server configuration..");
|
||||
if (!ZoneConfig::LoadConfig()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading server configuration failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading server configuration failed.");
|
||||
return 1;
|
||||
}
|
||||
const ZoneConfig *Config=ZoneConfig::get();
|
||||
|
||||
if(!load_log_settings(Config->LogSettingsFile.c_str()))
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
|
||||
worldserver.SetPassword(Config->SharedKey.c_str());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Connecting to MySQL...");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Connecting to MySQL...");
|
||||
if (!database.Connect(
|
||||
Config->DatabaseHost.c_str(),
|
||||
Config->DatabaseUsername.c_str(),
|
||||
Config->DatabasePassword.c_str(),
|
||||
Config->DatabaseDB.c_str(),
|
||||
Config->DatabasePort)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Cannot continue without a database connection.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Cannot continue without a database connection.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -186,121 +186,121 @@ int main(int argc, char** argv) {
|
||||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
#endif
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
|
||||
/*
|
||||
* Setup nice signal handlers
|
||||
*/
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
#ifndef WIN32
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *log_ini_file = "./log.ini";
|
||||
if(!load_log_settings(log_ini_file))
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", log_ini_file);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Warning: Unable to read %s", log_ini_file);
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", log_ini_file);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Log settings loaded from %s", log_ini_file);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Mapping Incoming Opcodes");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Mapping Incoming Opcodes");
|
||||
MapOpcodes();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading Variables");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading Variables");
|
||||
database.LoadVariables();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading zone names");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading zone names");
|
||||
database.LoadZoneNames();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading items");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading items");
|
||||
if (!database.LoadItems()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading items FAILED!");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed. But ignoring error and going on...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading items FAILED!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed. But ignoring error and going on...");
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading npc faction lists");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading npc faction lists");
|
||||
if (!database.LoadNPCFactionLists()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading npcs faction lists FAILED!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading npcs faction lists FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading loot tables");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading loot tables");
|
||||
if (!database.LoadLoot()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading loot FAILED!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading loot FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading skill caps");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading skill caps");
|
||||
if (!database.LoadSkillCaps()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading skill caps FAILED!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading skill caps FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading spells");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading spells");
|
||||
EQEmu::MemoryMappedFile *mmf = nullptr;
|
||||
LoadSpells(&mmf);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading base data");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading base data");
|
||||
if (!database.LoadBaseData()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading base data FAILED!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading base data FAILED!");
|
||||
CheckEQEMuErrorAndPause();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading guilds");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading guilds");
|
||||
guild_mgr.LoadGuilds();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading factions");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading factions");
|
||||
database.LoadFactionData();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading titles");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading titles");
|
||||
title_manager.LoadTitles();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading AA effects");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading AA effects");
|
||||
database.LoadAAEffects();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading tributes");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading tributes");
|
||||
database.LoadTributes();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading corpse timers");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading corpse timers");
|
||||
database.GetDecayTimes(npcCorpseDecayTimes);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading commands");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading commands");
|
||||
int retval=command_init();
|
||||
if(retval<0)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Command loading FAILED");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Command loading FAILED");
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "%d commands loaded", retval);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "%d commands loaded", retval);
|
||||
|
||||
//rules:
|
||||
{
|
||||
char tmp[64];
|
||||
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading rule set '%s'", tmp);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading rule set '%s'", tmp);
|
||||
if(!RuleManager::Instance()->LoadRules(&database, tmp)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp);
|
||||
}
|
||||
} else {
|
||||
if(!RuleManager::Instance()->LoadRules(&database, "default")) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "No rule set configured, using default rules");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "No rule set configured, using default rules");
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loaded default rule set 'default'", tmp);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loaded default rule set 'default'", tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(RuleB(TaskSystem, EnableTaskSystem)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[INIT] Loading Tasks");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[INIT] Loading Tasks");
|
||||
taskmanager = new TaskManager;
|
||||
taskmanager->LoadTasks();
|
||||
}
|
||||
@@ -317,11 +317,11 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
//now we have our parser, load the quests
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading quests");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading quests");
|
||||
parse->ReloadQuests();
|
||||
|
||||
if (!worldserver.Connect()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Worldserver Connection Failed :: worldserver.Connect()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Worldserver Connection Failed :: worldserver.Connect()");
|
||||
}
|
||||
|
||||
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
|
||||
@@ -332,9 +332,9 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
#endif
|
||||
if (!strlen(zone_name) || !strcmp(zone_name,".")) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Entering sleep mode");
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zone Bootup failed :: Zone::Bootup");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zone Bootup failed :: Zone::Bootup");
|
||||
zone = 0;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ int main(int argc, char** argv) {
|
||||
RegisterAllPatches(stream_identifier);
|
||||
|
||||
#ifndef WIN32
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Main thread running with thread id %d", pthread_self());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Main thread running with thread id %d", pthread_self());
|
||||
#endif
|
||||
|
||||
Timer quest_timers(100);
|
||||
@@ -365,13 +365,13 @@ int main(int argc, char** argv) {
|
||||
worldserver.Process();
|
||||
|
||||
if (!eqsf.IsOpen() && Config->ZonePort!=0) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Starting EQ Network server on port %d",Config->ZonePort);
|
||||
Log.DoLog(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));
|
||||
|
||||
if (!eqsf.Open(Config->ZonePort)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to open port %d",Config->ZonePort);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to open port %d",Config->ZonePort);
|
||||
ZoneConfig::SetZonePort(0);
|
||||
worldserver.Disconnect();
|
||||
worldwasconnected = false;
|
||||
@@ -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();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "New connection from %s:%d", inet_ntoa(in),ntohs(eqss->GetRemotePort()));
|
||||
Log.DoLog(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();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "New client from %s:%d", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
Log.DoLog(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();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Proper zone shutdown complete.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Proper zone shutdown complete.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CatchSignal(int sig_num) {
|
||||
#ifdef _WINDOWS
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Recieved signal: %i", sig_num);
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Shutting down...");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Shutting down...");
|
||||
}
|
||||
|
||||
uint32 NetConnection::GetIP()
|
||||
@@ -628,7 +628,7 @@ void LoadSpells(EQEmu::MemoryMappedFile **mmf) {
|
||||
spells = reinterpret_cast<SPDat_Spell_Struct*>((*mmf)->Get());
|
||||
mutex.Unlock();
|
||||
} catch(std::exception &ex) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading spells: %s", ex.what());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading spells: %s", ex.what());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -508,7 +508,7 @@ void NPC::QueryLoot(Client* to)
|
||||
for(ItemList::iterator cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++x) {
|
||||
const Item_Struct* item = database.GetItem((*cur)->item_id);
|
||||
if (item == nullptr) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Database error, invalid item");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Database error, invalid item");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1004,7 +1004,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C
|
||||
spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
npc_type_id = results.LastInsertedID();
|
||||
@@ -1021,7 +1021,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C
|
||||
spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
npc_type_id = results.LastInsertedID();
|
||||
@@ -1033,7 +1033,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C
|
||||
query = StringFormat("INSERT INTO spawngroup (id, name) VALUES(%i, '%s-%s')", 0, zone, spawn->GetName());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
uint32 spawngroupid = results.LastInsertedID();
|
||||
@@ -1047,7 +1047,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C
|
||||
spawn->GetHeading(), spawngroupid);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1058,7 +1058,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C
|
||||
spawngroupid, npc_type_id, 100);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1075,7 +1075,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_ve
|
||||
zone, spawn->GetName(), Timer::GetCurrentTime());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
last_insert_id = results.LastInsertedID();
|
||||
@@ -1098,7 +1098,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_ve
|
||||
spawn->GetHeading(), last_insert_id);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
spawnid = results.LastInsertedID();
|
||||
@@ -1110,7 +1110,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_ve
|
||||
last_insert_id, spawn->GetNPCTypeID(), 100);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1672,7 +1672,7 @@ void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool rem
|
||||
{
|
||||
if(database.SetSpecialAttkFlag(this->GetNPCTypeID(), orig_parse))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "NPCTypeID: %i flagged to '%s' for Special Attacks.\n",this->GetNPCTypeID(),orig_parse);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "NPCTypeID: %i flagged to '%s' for Special Attacks.\n",this->GetNPCTypeID(),orig_parse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -336,7 +336,7 @@ const ItemInst* Object::GetItem(uint8 index) {
|
||||
void Object::PutItem(uint8 index, const ItemInst* inst)
|
||||
{
|
||||
if (index > 9) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Object::PutItem: Invalid index specified (%i)", index);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Object::PutItem: Invalid index specified (%i)", index);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ uint32 ZoneDatabase::AddObject(uint32 type, uint32 icon, const Object_Struct& ob
|
||||
safe_delete_array(object_name);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to insert object: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to insert object: %s", results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -635,7 +635,7 @@ void ZoneDatabase::UpdateObject(uint32 id, uint32 type, uint32 icon, const Objec
|
||||
safe_delete_array(object_name);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to update object: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to update object: %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ void ZoneDatabase::DeleteObject(uint32 id)
|
||||
std::string query = StringFormat("DELETE FROM object WHERE id = %i", id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to delete object: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to delete object: %s", results.ErrorMessage().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+73
-73
@@ -61,19 +61,19 @@ PathManager* PathManager::LoadPathFile(const char* ZoneName)
|
||||
|
||||
if(Ret->loadPaths(PathFile))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Path File %s loaded.", ZonePathFileName);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Path File %s loaded.", ZonePathFileName);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Path File %s failed to load.", ZonePathFileName);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Path File %s failed to load.", ZonePathFileName);
|
||||
safe_delete(Ret);
|
||||
}
|
||||
fclose(PathFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Path File %s not found.", ZonePathFileName);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Path File %s not found.", ZonePathFileName);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
@@ -103,18 +103,18 @@ bool PathManager::loadPaths(FILE *PathFile)
|
||||
|
||||
if(strncmp(Magic, "EQEMUPATH", 9))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Bad Magic String in .path file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Bad Magic String in .path file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
fread(&Head, sizeof(Head), 1, PathFile);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Path File Header: Version %ld, PathNodes %ld",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Path File Header: Version %ld, PathNodes %ld",
|
||||
(long)Head.version, (long)Head.PathNodeCount);
|
||||
|
||||
if(Head.version != 2)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unsupported path file version.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unsupported path file version.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ bool PathManager::loadPaths(FILE *PathFile)
|
||||
{
|
||||
if(PathNodes[i].Neighbours[j].id > MaxNodeID)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id);
|
||||
|
||||
PathFileValid = false;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ Map::Vertex PathManager::GetPathNodeCoordinates(int NodeNumber, bool BestZ)
|
||||
|
||||
std::deque<int> PathManager::FindRoute(int startID, int endID)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "FindRoute from node %i to %i", startID, endID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "FindRoute from node %i to %i", startID, endID);
|
||||
|
||||
memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount);
|
||||
|
||||
@@ -330,7 +330,7 @@ std::deque<int> PathManager::FindRoute(int startID, int endID)
|
||||
}
|
||||
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Unable to find a route.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Unable to find a route.");
|
||||
return Route;
|
||||
|
||||
}
|
||||
@@ -352,7 +352,7 @@ auto path_compare = [](const PathNodeSortStruct& a, const PathNodeSortStruct& b)
|
||||
|
||||
std::deque<int> PathManager::FindRoute(Map::Vertex Start, Map::Vertex End)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "FindRoute(%8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f)", Start.x, Start.y, Start.z, End.x, End.y, End.z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "FindRoute(%8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f)", Start.x, Start.y, Start.z, End.x, End.y, End.z);
|
||||
|
||||
std::deque<int> noderoute;
|
||||
|
||||
@@ -386,7 +386,7 @@ std::deque<int> PathManager::FindRoute(Map::Vertex Start, Map::Vertex End)
|
||||
|
||||
for(auto Iterator = SortedByDistance.begin(); Iterator != SortedByDistance.end(); ++Iterator)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Iterator).id].v, 1.0f, nullptr))
|
||||
{
|
||||
@@ -396,11 +396,11 @@ std::deque<int> PathManager::FindRoute(Map::Vertex Start, Map::Vertex End)
|
||||
}
|
||||
|
||||
if(ClosestPathNodeToStart <0 ) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "No LOS to any starting Path Node within range.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "No LOS to any starting Path Node within range.");
|
||||
return noderoute;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Closest Path Node To Start: %2d", ClosestPathNodeToStart);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Closest Path Node To Start: %2d", ClosestPathNodeToStart);
|
||||
|
||||
// Find the nearest PathNode the end point has LOS to
|
||||
|
||||
@@ -424,8 +424,8 @@ std::deque<int> PathManager::FindRoute(Map::Vertex Start, Map::Vertex End)
|
||||
|
||||
for(auto Iterator = SortedByDistance.begin(); Iterator != SortedByDistance.end(); ++Iterator)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Checking Reachability of Node %i from End Position.", PathNodes[(*Iterator).id].id);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " (%8.3f, %8.3f, %8.3f) to (%8.3f, %8.3f, %8.3f)",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Checking Reachability of Node %i from End Position.", PathNodes[(*Iterator).id].id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " (%8.3f, %8.3f, %8.3f) to (%8.3f, %8.3f, %8.3f)",
|
||||
End.x, End.y, End.z,
|
||||
PathNodes[(*Iterator).id].v.x, PathNodes[(*Iterator).id].v.y, PathNodes[(*Iterator).id].v.z);
|
||||
|
||||
@@ -437,11 +437,11 @@ std::deque<int> PathManager::FindRoute(Map::Vertex Start, Map::Vertex End)
|
||||
}
|
||||
|
||||
if(ClosestPathNodeToEnd < 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "No LOS to any end Path Node within range.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "No LOS to any end Path Node within range.");
|
||||
return noderoute;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Closest Path Node To End: %2d", ClosestPathNodeToEnd);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Closest Path Node To End: %2d", ClosestPathNodeToEnd);
|
||||
|
||||
if(ClosestPathNodeToStart == ClosestPathNodeToEnd)
|
||||
{
|
||||
@@ -673,7 +673,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
if(To == From)
|
||||
return To;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "UpdatePath. From(%8.3f, %8.3f, %8.3f) To(%8.3f, %8.3f, %8.3f)", From.x, From.y, From.z, To.x, To.y, To.z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "UpdatePath. From(%8.3f, %8.3f, %8.3f) To(%8.3f, %8.3f, %8.3f)", From.x, From.y, From.z, To.x, To.y, To.z);
|
||||
|
||||
if(From == PathingLastPosition)
|
||||
{
|
||||
@@ -681,7 +681,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
if((PathingLoopCount > 5) && !IsRooted())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "appears to be stuck. Teleporting them to next position.", GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "appears to be stuck. Teleporting them to next position.", GetName());
|
||||
|
||||
if(Route.size() == 0)
|
||||
{
|
||||
@@ -721,7 +721,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
// If we are already pathing, and the destination is the same as before ...
|
||||
if(SameDestination)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Still pathing to the same destination.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Still pathing to the same destination.");
|
||||
|
||||
// Get the coordinates of the first path node we are going to.
|
||||
NextNode = Route.front();
|
||||
@@ -732,7 +732,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
// We have reached the path node.
|
||||
if(NodeLoc == From)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Arrived at node %i", NextNode);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Arrived at node %i", NextNode);
|
||||
|
||||
NodeReached = true;
|
||||
|
||||
@@ -746,17 +746,17 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
// target, and we may run past the target if we don't check LOS at this point.
|
||||
int RouteSize = Route.size();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Route size is %i", RouteSize);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Route size is %i", RouteSize);
|
||||
|
||||
if((RouteSize == 2)
|
||||
|| ((PathingTraversedNodes >= RuleI(Pathing, MinNodesTraversedForLOSCheck))
|
||||
&& (RouteSize <= RuleI(Pathing, MinNodesLeftForLOSCheck))
|
||||
&& PathingLOSCheckTimer->Check()))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking distance to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking distance to target.");
|
||||
float Distance = VertexDistanceNoRoot(From, To);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Distance between From and To (NoRoot) is %8.3f", Distance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Distance between From and To (NoRoot) is %8.3f", Distance);
|
||||
|
||||
if((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort))
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
@@ -765,18 +765,18 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
|
||||
if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " No hazards. Running directly to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " No hazards. Running directly to target.");
|
||||
Route.clear();
|
||||
|
||||
return To;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Continuing on node path.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Continuing on node path.");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -802,7 +802,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
if(Route.size() == 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Missing node after teleport.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Missing node after teleport.");
|
||||
return To;
|
||||
}
|
||||
|
||||
@@ -812,7 +812,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
Teleport(NodeLoc);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " TELEPORTED to %8.3f, %8.3f, %8.3f\n", NodeLoc.x, NodeLoc.y, NodeLoc.z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " TELEPORTED to %8.3f, %8.3f, %8.3f\n", NodeLoc.x, NodeLoc.y, NodeLoc.z);
|
||||
|
||||
Route.pop_front();
|
||||
|
||||
@@ -823,7 +823,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
}
|
||||
zone->pathing->OpenDoors(PathingLastNodeVisited, NextNode, this);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Now moving to node %i", NextNode);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Now moving to node %i", NextNode);
|
||||
|
||||
return zone->pathing->GetPathNodeCoordinates(NextNode);
|
||||
}
|
||||
@@ -831,7 +831,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
{
|
||||
// we have run all the nodes, all that is left is the direct path from the last node
|
||||
// to the destination
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Reached end of node path, running direct to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Reached end of node path, running direct to target.");
|
||||
|
||||
return To;
|
||||
}
|
||||
@@ -845,11 +845,11 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
&& (RouteSize <= RuleI(Pathing, MinNodesLeftForLOSCheck))
|
||||
&& PathingLOSCheckTimer->Check())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking distance to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking distance to target.");
|
||||
|
||||
float Distance = VertexDistanceNoRoot(From, To);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Distance between From and To (NoRoot) is %8.3f", Distance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Distance between From and To (NoRoot) is %8.3f", Distance);
|
||||
|
||||
if((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort))
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
@@ -858,18 +858,18 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
|
||||
if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " No hazards. Running directly to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " No hazards. Running directly to target.");
|
||||
Route.clear();
|
||||
|
||||
return To;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Continuing on node path.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Continuing on node path.");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -881,7 +881,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
{
|
||||
// We get here if we were already pathing, but our destination has now changed.
|
||||
//
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Target has changed position.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Target has changed position.");
|
||||
// Update our record of where we are going to.
|
||||
PathingDestination = To;
|
||||
// Check if we now have LOS etc to the new destination.
|
||||
@@ -892,23 +892,23 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
if((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort))
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking for short LOS at distance %8.3f.", Distance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking for short LOS at distance %8.3f.", Distance);
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
|
||||
if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " No hazards. Running directly to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " No hazards. Running directly to target.");
|
||||
Route.clear();
|
||||
return To;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Continuing on node path.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Continuing on node path.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -919,19 +919,19 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
{
|
||||
if(!PathingRouteUpdateTimerShort->Check())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Short route update timer not yet expired.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Short route update timer not yet expired.");
|
||||
return zone->pathing->GetPathNodeCoordinates(Route.front());
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Short route update timer expired.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Short route update timer expired.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!PathingRouteUpdateTimerLong->Check())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Long route update timer not yet expired.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Long route update timer not yet expired.");
|
||||
return zone->pathing->GetPathNodeCoordinates(Route.front());
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Long route update timer expired.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Long route update timer expired.");
|
||||
}
|
||||
|
||||
// We are already pathing, destination changed, no LOS. Find the nearest node to our destination.
|
||||
@@ -940,7 +940,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
// Destination unreachable via pathing, return direct route.
|
||||
if(DestinationPathNode == -1)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Unable to find path node for new destination. Running straight to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Unable to find path node for new destination. Running straight to target.");
|
||||
Route.clear();
|
||||
return To;
|
||||
}
|
||||
@@ -948,7 +948,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
// one, we will carry on on our path.
|
||||
if(DestinationPathNode == Route.back())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Same destination Node (%i). Continue with current path.", DestinationPathNode);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Same destination Node (%i). Continue with current path.", DestinationPathNode);
|
||||
|
||||
NodeLoc = zone->pathing->GetPathNodeCoordinates(Route.front());
|
||||
|
||||
@@ -956,7 +956,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
// Check if we have reached a path node.
|
||||
if(NodeLoc == From)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Arrived at node %i, moving to next one.\n", Route.front());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Arrived at node %i, moving to next one.\n", Route.front());
|
||||
|
||||
NodeReached = true;
|
||||
|
||||
@@ -979,7 +979,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
if(Route.size() == 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Missing node after teleport.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Missing node after teleport.");
|
||||
return To;
|
||||
}
|
||||
|
||||
@@ -989,7 +989,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
Teleport(NodeLoc);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " TELEPORTED to %8.3f, %8.3f, %8.3f\n", NodeLoc.x, NodeLoc.y, NodeLoc.z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " TELEPORTED to %8.3f, %8.3f, %8.3f\n", NodeLoc.x, NodeLoc.y, NodeLoc.z);
|
||||
|
||||
Route.pop_front();
|
||||
|
||||
@@ -999,7 +999,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
NextNode = Route.front();
|
||||
}
|
||||
// Return the coords of our next path node on the route.
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Now moving to node %i", NextNode);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Now moving to node %i", NextNode);
|
||||
|
||||
zone->pathing->OpenDoors(PathingLastNodeVisited, NextNode, this);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Reached end of path grid. Running direct to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Reached end of path grid. Running direct to target.");
|
||||
return To;
|
||||
}
|
||||
}
|
||||
@@ -1015,7 +1015,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Target moved. End node is different. Clearing route.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Target moved. End node is different. Clearing route.");
|
||||
|
||||
Route.clear();
|
||||
// We will now fall through to get a new route.
|
||||
@@ -1025,11 +1025,11 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Our route list is empty.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Our route list is empty.");
|
||||
|
||||
if((SameDestination) && !PathingLOSCheckTimer->Check())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Destination same as before, LOS check timer not reached. Returning To.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Destination same as before, LOS check timer not reached. Returning To.");
|
||||
return To;
|
||||
}
|
||||
|
||||
@@ -1044,22 +1044,22 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
if((Distance <= RuleR(Pathing, MinDistanceForLOSCheckLong))
|
||||
&& (ABS(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold)))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking for long LOS at distance %8.3f.", Distance);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Checking for long LOS at distance %8.3f.", Distance);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
PathingLOSState = NoLOS;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "NoLOS");
|
||||
|
||||
if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Target is reachable. Running directly there.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Target is reachable. Running directly there.");
|
||||
return To;
|
||||
}
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Calculating new route to target.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Calculating new route to target.");
|
||||
|
||||
Route = zone->pathing->FindRoute(From, To);
|
||||
|
||||
@@ -1067,14 +1067,14 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
|
||||
if(Route.size() == 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " No route available, running direct.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " No route available, running direct.");
|
||||
|
||||
return To;
|
||||
}
|
||||
|
||||
if(SameDestination && (Route.front() == PathingLastNodeVisited))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " Probable loop detected. Same destination and Route.front() == PathingLastNodeVisited.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " Probable loop detected. Same destination and Route.front() == PathingLastNodeVisited.");
|
||||
|
||||
Route.clear();
|
||||
|
||||
@@ -1082,7 +1082,7 @@ Map::Vertex Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &
|
||||
}
|
||||
NodeLoc = zone->pathing->GetPathNodeCoordinates(Route.front());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " New route determined, heading for node %i", Route.front());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " New route determined, heading for node %i", Route.front());
|
||||
|
||||
PathingLoopCount = 0;
|
||||
|
||||
@@ -1124,7 +1124,7 @@ int PathManager::FindNearestPathNode(Map::Vertex Position)
|
||||
|
||||
for(auto Iterator = SortedByDistance.begin(); Iterator != SortedByDistance.end(); ++Iterator)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(Position, PathNodes[(*Iterator).id].v, 1.0f, nullptr))
|
||||
{
|
||||
@@ -1134,7 +1134,7 @@ int PathManager::FindNearestPathNode(Map::Vertex Position)
|
||||
}
|
||||
|
||||
if(ClosestPathNodeToStart <0 ) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "No LOS to any starting Path Node within range.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "No LOS to any starting Path Node within range.");
|
||||
return -1;
|
||||
}
|
||||
return ClosestPathNodeToStart;
|
||||
@@ -1150,14 +1150,14 @@ bool PathManager::NoHazards(Map::Vertex From, Map::Vertex To)
|
||||
|
||||
if(ABS(NewZ - From.z) > RuleR(Pathing, ZDiffThreshold))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f",
|
||||
From.x, From.y, From.z, MidPoint.x, MidPoint.y, MidPoint.z, NewZ - From.z);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "No HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "No HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f",
|
||||
From.x, From.y, From.z, MidPoint.x, MidPoint.y, MidPoint.z, NewZ - From.z);
|
||||
}
|
||||
|
||||
@@ -1189,7 +1189,7 @@ bool PathManager::NoHazardsAccurate(Map::Vertex From, Map::Vertex To)
|
||||
float NewZ = zone->zonemap->FindBestZ(TestPoint, nullptr);
|
||||
if (ABS(NewZ - last_z) > 5.0f)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Best Z %8.3f, Z Change is %8.3f",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Best Z %8.3f, Z Change is %8.3f",
|
||||
From.x, From.y, From.z, TestPoint.x, TestPoint.y, TestPoint.z, NewZ, NewZ - From.z);
|
||||
return false;
|
||||
}
|
||||
@@ -1215,30 +1215,30 @@ bool PathManager::NoHazardsAccurate(Map::Vertex From, Map::Vertex To)
|
||||
}
|
||||
if (best_z2 == -999990)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED, really deep water/lava!");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED, really deep water/lava!");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ABS(NewZ - best_z2) > RuleR(Pathing, ZDiffThreshold))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED, water is fairly deep at %8.3f units deep", ABS(NewZ - best_z2));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD DETECTED, water is fairly deep at %8.3f units deep", ABS(NewZ - best_z2));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD NOT DETECTED, water is shallow at %8.3f units deep", ABS(NewZ - best_z2));
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, " HAZARD NOT DETECTED, water is shallow at %8.3f units deep", ABS(NewZ - best_z2));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Hazard point not in water or lava!");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Hazard point not in water or lava!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "No water map loaded for hazards!");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "No water map loaded for hazards!");
|
||||
}
|
||||
|
||||
curx += stepx;
|
||||
@@ -1290,7 +1290,7 @@ void PathManager::OpenDoors(int Node1, int Node2, Mob *ForWho)
|
||||
|
||||
if(d && !d->IsDoorOpen() )
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Opening door %i for %s", PathNodes[Node1].Neighbours[i].DoorID, ForWho->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Opening door %i for %s", PathNodes[Node1].Neighbours[i].DoorID, ForWho->GetName());
|
||||
|
||||
d->ForceOpen(ForWho);
|
||||
}
|
||||
|
||||
@@ -1271,15 +1271,15 @@ XS(XS_Client_MovePC)
|
||||
}
|
||||
else {
|
||||
if (THIS->IsMerc())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Merc reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Merc reference");
|
||||
else if (THIS->IsNPC())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type NPC reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type NPC reference");
|
||||
#ifdef BOTS
|
||||
else if (THIS->IsBot())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Bot reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Bot reference");
|
||||
#endif
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process an Unknown type reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process an Unknown type reference");
|
||||
|
||||
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||
}
|
||||
@@ -1317,15 +1317,15 @@ XS(XS_Client_MovePCInstance)
|
||||
}
|
||||
else {
|
||||
if (THIS->IsMerc())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Merc reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Merc reference");
|
||||
else if (THIS->IsNPC())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type NPC reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type NPC reference");
|
||||
#ifdef BOTS
|
||||
else if (THIS->IsBot())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Bot reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Bot reference");
|
||||
#endif
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process an Unknown type reference");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process an Unknown type reference");
|
||||
|
||||
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||
|
||||
|
||||
+5
-5
@@ -213,7 +213,7 @@ void ZoneDatabase::DeletePetitionFromDB(Petition* wpet) {
|
||||
std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", wpet->GetID());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeletePetitionFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeletePetitionFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ void ZoneDatabase::UpdatePetitionToDB(Petition* wpet) {
|
||||
wpet->CheckedOut() ? 1: 0, wpet->GetID());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdatePetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdatePetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -254,12 +254,12 @@ void ZoneDatabase::InsertPetitionToDB(Petition* wpet)
|
||||
safe_delete_array(petitiontext);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in InsertPetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in InsertPetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "New petition created");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "New petition created");
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -273,7 +273,7 @@ void ZoneDatabase::RefreshPetitionsFromDB()
|
||||
"FROM petitions ORDER BY petid";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in RefreshPetitionsFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in RefreshPetitionsFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -243,7 +243,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
|
||||
PetRecord record;
|
||||
if(!database.GetPoweredPetEntry(pettype, act_power, &record)) {
|
||||
Message(13, "Unable to find data for pet %s", pettype);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find data for pet %s, check pets table.", pettype);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find data for pet %s, check pets table.", pettype);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
|
||||
const NPCType *base = database.GetNPCType(record.npc_type);
|
||||
if(base == nullptr) {
|
||||
Message(13, "Unable to load NPC data for pet %s", pettype);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
// if the database query failed
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error querying database for monster summoning pet in zone %s (%s)", zone->GetShortName(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error querying database for monster summoning pet in zone %s (%s)", zone->GetShortName(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
if (results.RowCount() != 0) {
|
||||
@@ -395,7 +395,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
|
||||
npc_type->helmtexture = monster->helmtexture;
|
||||
npc_type->herosforgemodel = monster->herosforgemodel;
|
||||
} else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading NPC data for monster summoning pet (NPC ID %d)", monsterid);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading NPC data for monster summoning pet (NPC ID %d)", monsterid);
|
||||
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ bool ZoneDatabase::GetPoweredPetEntry(const char *pet_type, int16 petpower, PetR
|
||||
pet_type, petpower);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetPoweredPetEntry query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetPoweredPetEntry query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -656,13 +656,13 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) {
|
||||
std::string query = StringFormat("SELECT nested_set FROM pets_equipmentset WHERE set_id = '%s'", curset);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
// invalid set reference, it doesn't exist
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems equipment set '%d' does not exist", curset);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems equipment set '%d' does not exist", curset);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) {
|
||||
query = StringFormat("SELECT slot, item_id FROM pets_equipmentset_entries WHERE set_id='%s'", curset);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
else {
|
||||
for (row = results.begin(); row != results.end(); ++row)
|
||||
{
|
||||
|
||||
+15
-15
@@ -154,7 +154,7 @@ void QuestManager::echo(int colour, const char *str) {
|
||||
void QuestManager::say(const char *str) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::say called with nullptr owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::say called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -170,7 +170,7 @@ void QuestManager::say(const char *str) {
|
||||
void QuestManager::say(const char *str, uint8 language) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::say called with nullptr owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::say called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -548,7 +548,7 @@ void QuestManager::stopalltimers(Mob *mob) {
|
||||
void QuestManager::emote(const char *str) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::emote called with nullptr owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::emote called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -559,7 +559,7 @@ void QuestManager::emote(const char *str) {
|
||||
void QuestManager::shout(const char *str) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::shout called with nullptr owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::shout called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -570,7 +570,7 @@ void QuestManager::shout(const char *str) {
|
||||
void QuestManager::shout2(const char *str) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::shout2 called with nullptr owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::shout2 called with nullptr owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -589,7 +589,7 @@ void QuestManager::gmsay(const char *str, uint32 color, bool send_to_world, uint
|
||||
void QuestManager::depop(int npc_type) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner || !owner->IsNPC()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depop called with nullptr owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depop called with nullptr owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -619,7 +619,7 @@ void QuestManager::depop(int npc_type) {
|
||||
void QuestManager::depop_withtimer(int npc_type) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (!owner || !owner->IsNPC()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depop_withtimer called with nullptr owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depop_withtimer called with nullptr owner or non-NPC owner. Probably syntax error in quest file.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -646,7 +646,7 @@ void QuestManager::depopall(int npc_type) {
|
||||
entity_list.DepopAll(npc_type);
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depopall called with nullptr owner, non-NPC owner, or invalid NPC Type ID. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depopall called with nullptr owner, non-NPC owner, or invalid NPC Type ID. Probably syntax error in quest file.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -655,7 +655,7 @@ void QuestManager::depopzone(bool StartSpawnTimer) {
|
||||
zone->Depop(StartSpawnTimer);
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depopzone called with nullptr zone. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::depopzone called with nullptr zone. Probably syntax error in quest file.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,7 +664,7 @@ void QuestManager::repopzone() {
|
||||
zone->Repop();
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::repopzone called with nullptr zone. Probably syntax error in quest file.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::repopzone called with nullptr zone. Probably syntax error in quest file.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1652,7 +1652,7 @@ void QuestManager::showgrid(int grid) {
|
||||
"ORDER BY `number`", grid, zone->GetZoneID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "Error loading grid %d for showgrid(): %s", grid, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "Error loading grid %d for showgrid(): %s", grid, results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2074,7 +2074,7 @@ bool QuestManager::istaskenabled(int taskid) {
|
||||
|
||||
void QuestManager::tasksetselector(int tasksetid) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for task set %i", tasksetid);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for task set %i", tasksetid);
|
||||
if(RuleB(TaskSystem, EnableTaskSystem) && initiator && owner && taskmanager)
|
||||
initiator->TaskSetSelector(owner, tasksetid);
|
||||
}
|
||||
@@ -2641,7 +2641,7 @@ const char* QuestManager::saylink(char* Phrase, bool silent, const char* LinkNam
|
||||
std::string insert_query = StringFormat("INSERT INTO `saylink` (`phrase`) VALUES ('%s')", escaped_string);
|
||||
results = database.QueryDatabase(insert_query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
|
||||
} else {
|
||||
results = database.QueryDatabase(query);
|
||||
if (results.Success()) {
|
||||
@@ -2649,7 +2649,7 @@ const char* QuestManager::saylink(char* Phrase, bool silent, const char* LinkNam
|
||||
for(auto row = results.begin(); row != results.end(); ++row)
|
||||
sayid = atoi(row[0]);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2809,7 +2809,7 @@ void QuestManager::voicetell(const char *str, int macronum, int racenum, int gen
|
||||
safe_delete(outapp);
|
||||
}
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::voicetell from %s. Client %s not found.", owner->GetName(), str);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Quests, "QuestManager::voicetell from %s. Client %s not found.", owner->GetName(), str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -99,7 +99,7 @@ void Raid::AddMember(Client *c, uint32 group, bool rleader, bool groupleader, bo
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error inserting into raid members: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error inserting into raid members: %s", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
LearnMembers();
|
||||
@@ -233,12 +233,12 @@ void Raid::SetRaidLeader(const char *wasLead, const char *name)
|
||||
std::string query = StringFormat("UPDATE raid_members SET israidleader = 0 WHERE name = '%s'", wasLead);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
query = StringFormat("UPDATE raid_members SET israidleader = 1 WHERE name = '%s'", name);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
strn0cpy(leadername, name, 64);
|
||||
|
||||
@@ -271,7 +271,7 @@ void Raid::SaveGroupLeaderAA(uint32 gid)
|
||||
safe_delete_array(queryBuffer);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Raid::SaveRaidLeaderAA()
|
||||
@@ -285,7 +285,7 @@ void Raid::SaveRaidLeaderAA()
|
||||
safe_delete_array(queryBuffer);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Raid::UpdateGroupAAs(uint32 gid)
|
||||
@@ -498,7 +498,7 @@ void Raid::CastGroupSpell(Mob* caster, uint16 spellid, uint32 gid)
|
||||
#endif
|
||||
}
|
||||
else{
|
||||
Log.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());
|
||||
Log.DoLog(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
|
||||
Log.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());
|
||||
Log.DoLog(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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1407,7 +1407,7 @@ void Raid::GetRaidDetails()
|
||||
return;
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1439,7 +1439,7 @@ bool Raid::LearnMembers()
|
||||
return false;
|
||||
|
||||
if(results.RowCount() == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
|
||||
disbandCheck = true;
|
||||
return false;
|
||||
}
|
||||
@@ -1643,7 +1643,7 @@ void Raid::SetGroupMentor(uint32 group_id, int percent, char *name)
|
||||
name, percent, group_id, GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Raid::ClearGroupMentor(uint32 group_id)
|
||||
@@ -1658,7 +1658,7 @@ void Raid::ClearGroupMentor(uint32 group_id)
|
||||
group_id, GetID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
// there isn't a nice place to add this in another function, unlike groups
|
||||
|
||||
+76
-76
@@ -153,13 +153,13 @@ bool Spawn2::Process() {
|
||||
if (timer.Check()) {
|
||||
timer.Disable();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Timer has triggered", spawn2_id);
|
||||
Log.DoLog(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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: spawning prevented by spawn condition %d", spawn2_id, condition_id);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Unable to locate spawn group %d. Disabling.", spawn2_id, spawngroup_id_);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d did not yeild an NPC! not spawning.", spawn2_id, spawngroup_id_);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", spawn2_id, spawngroup_id_, npcid);
|
||||
Log.DoLog(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))
|
||||
{
|
||||
Log.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);
|
||||
Log.DoLog(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)) {
|
||||
Log.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);
|
||||
Log.DoLog(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()) {
|
||||
Log.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);
|
||||
Log.DoLog(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 {
|
||||
Log.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);
|
||||
Log.DoLog(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_);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Loading grid %d for %s", spawn2_id, grid_, npcthis->GetName());
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
}
|
||||
|
||||
void Spawn2::Depop() {
|
||||
timer.Disable();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop disabled", spawn2_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop disabled", spawn2_id);
|
||||
npcthis = nullptr;
|
||||
}
|
||||
|
||||
void Spawn2::Repop(uint32 delay) {
|
||||
if (delay == 0) {
|
||||
timer.Trigger();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop immediately.", spawn2_id);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset, repop immediately.", spawn2_id);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset for repop, repop in %d ms", spawn2_id, delay);
|
||||
Log.DoLog(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);
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn group %d set despawn timer to %d ms.", spawn2_id, spawngroup_id_, cur);
|
||||
Log.DoLog(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));
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset by death, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Spawn reset by death, repop in %d ms", spawn2_id, timer.GetRemainingTime());
|
||||
//store it to database too
|
||||
}
|
||||
}
|
||||
@@ -364,7 +364,7 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
|
||||
zone_name, version);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PopulateZoneLists query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PopulateZoneLists query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -392,12 +392,12 @@ Spawn2* ZoneDatabase::LoadSpawn2(LinkedList<Spawn2*> &spawn2_list, uint32 spawn2
|
||||
"WHERE id = %i", spawn2id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ bool ZoneDatabase::CreateSpawn2(Client *client, uint32 spawngroup, const char* z
|
||||
respawn, variance, condition, cond_value);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CreateSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CreateSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -466,12 +466,12 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
if(GetSpawnCondition() != c.condition_id)
|
||||
return;
|
||||
|
||||
Log.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);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our threshold for this condition was not crossed. Doing nothing.", spawn2_id);
|
||||
Log.DoLog(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.
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Taking no action on existing spawn.", spawn2_id, new_state?"enabled":"disabled");
|
||||
Log.DoLog(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:
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Depoping our mob.", spawn2_id, new_state?"enabled":"disabled");
|
||||
Log.DoLog(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:
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn2 %d: Our condition is now %s. Forcing a repop.", spawn2_id, new_state?"enabled":"disabled");
|
||||
Log.DoLog(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:
|
||||
Log.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");
|
||||
Log.DoLog(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) {
|
||||
Log.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());
|
||||
Log.DoLog(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());
|
||||
Log.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);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns,"Spawn2 %d: Our condition is now %s. Not checking respawn timer.", spawn2_id, new_state?"enabled":"disabled");
|
||||
Log.DoLog(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) {
|
||||
Log.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);
|
||||
Log.DoLog(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;
|
||||
Log.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);
|
||||
Log.DoLog(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) {
|
||||
Log.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);
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Will trigger again in %d EQ minutes at %s.", cevent.id, cevent.period, t.c_str());
|
||||
Log.DoLog(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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Unable to find condition %d to execute on.", event.id, event.condition_id);
|
||||
Log.DoLog(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))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Unable to execute. Condition is strict, and event time has already passed.", event.id);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Setting condition %d to %d.", event.id, event.condition_id, event.argument);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Adding %d to condition %d, yeilding %d.", event.id, event.argument, event.condition_id, new_value);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Subtracting %d from condition %d, yeilding %d.", event.id, event.argument, event.condition_id, new_value);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Multiplying condition %d by %d, yeilding %d.", event.id, event.condition_id, event.argument, new_value);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Executing. Dividing condition %d by %d, yeilding %d.", event.id, event.condition_id, event.argument, new_value);
|
||||
Log.DoLog(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:
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Invalid event action type %d", event.id, event.action);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Event %d: Invalid event action type %d", event.id, event.action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ void SpawnConditionManager::UpdateDBEvent(SpawnEvent &event) {
|
||||
event.strict? 1: 0, event.id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to update spawn event '%s': %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to update spawn event '%s': %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -686,7 +686,7 @@ void SpawnConditionManager::UpdateDBCondition(const char* zone_name, uint32 inst
|
||||
cond_id, value, zone_name, instance_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to update spawn condition '%s': %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to update spawn condition '%s': %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std:
|
||||
"FROM spawn_events WHERE id = %d", event_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadDBEvent query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadDBEvent query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -727,7 +727,7 @@ bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std:
|
||||
std::string timeAsString;
|
||||
EQTime::ToString(&event.next, timeAsString);
|
||||
|
||||
Log.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());
|
||||
Log.DoLog(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;
|
||||
}
|
||||
@@ -742,7 +742,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
"WHERE zone = '%s'", zone_name);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Loaded spawn condition %d with value %d and on_change %d", cond.condition_id, cond.value, cond.on_change);
|
||||
Log.DoLog(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
|
||||
@@ -764,7 +764,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
zone_name, instance_id);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
spawn_conditions.clear();
|
||||
return false;
|
||||
}
|
||||
@@ -782,7 +782,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
"FROM spawn_events WHERE zone = '%s'", zone_name);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawnConditions events query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawnConditions events query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
event.period = atoi(row[2]);
|
||||
|
||||
if(event.period == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Refusing to load spawn event #%d because it has a period of 0\n", event.id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Refusing to load spawn event #%d because it has a period of 0\n", event.id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -811,7 +811,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
|
||||
|
||||
spawn_events.push_back(event);
|
||||
|
||||
Log.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);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Initial next trigger time set for spawn event %d", cevent.id);
|
||||
Log.DoLog(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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Catch up triggering on event %d", cevent.id);
|
||||
Log.DoLog(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)
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "No spawn events enabled. Disabling next event.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "No spawn events enabled. Disabling next event.");
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Next event determined to be event %d", next_id);
|
||||
Log.DoLog(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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d, but we do not have that conditon.", condition_id);
|
||||
Log.DoLog(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) {
|
||||
Log.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);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Condition update received from world for %d with value %d", condition_id, new_value);
|
||||
Log.DoLog(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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d, but we do not have that conditon.", condition_id);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d with value %d, which is what we already have.", condition_id, new_value);
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Local Condition update requested for %d with value %d", condition_id, new_value);
|
||||
Log.DoLog(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
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Remote spawn condition %d set to %d. Updating DB and notifying world.", condition_id, new_value);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Requested to reload event %d from the database.", event_id);
|
||||
Log.DoLog(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...
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Failed to reload event %d from the database.", event_id);
|
||||
Log.DoLog(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...
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Failed to reload event %d from the database.", event_id);
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Request to %s spawn event %d %sresetting trigger time", enabled?"enable":"disable", event_id, reset_base?"":"without ");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone. State set. Trigger time reset (period %d).", event_id, cevent.period);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone. State changed.", event_id);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d located in this zone but no change was needed.", event_id);
|
||||
Log.DoLog(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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to find spawn event %d in the database.", event_id);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Spawn event %d is not located in this zone but no change was needed.", event_id);
|
||||
Log.DoLog(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) {
|
||||
Log.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);
|
||||
Log.DoLog(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 {
|
||||
Log.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);
|
||||
Log.DoLog(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())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to find local condition %d in Get request.", condition_id);
|
||||
Log.DoLog(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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to query remote condition %d from zone %s in Get request.", condition_id, zone_short);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spawns, "Unable to load remote condition %d from zone %s in Get request.", condition_id, zone_short);
|
||||
Log.DoLog(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...
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -51,7 +51,7 @@ SpawnGroup::SpawnGroup( uint32 in_id, char* name, int in_group_spawn_limit, floa
|
||||
|
||||
uint32 SpawnGroup::GetNPCType() {
|
||||
#if EQDEBUG >= 10
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "SpawnGroup[%08x]::GetNPCType()", (uint32) this);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "SpawnGroup[%08x]::GetNPCType()", (uint32) this);
|
||||
#endif
|
||||
int npcType = 0;
|
||||
int totalchance = 0;
|
||||
@@ -167,7 +167,7 @@ bool ZoneDatabase::LoadSpawnGroups(const char* zone_name, uint16 version, SpawnG
|
||||
"AND zone = '%s'", zone_name);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error2 in PopulateZoneLists query '%'", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error2 in PopulateZoneLists query '%'", query.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g
|
||||
"FROM spawngroup WHERE spawngroup.ID = '%i'", spawngroupid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error2 in PopulateZoneLists query %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error2 in PopulateZoneLists query %s", query.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g
|
||||
"ORDER BY chance", spawngroupid);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error3 in PopulateZoneLists query '%s'", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error3 in PopulateZoneLists query '%s'", query.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+29
-29
@@ -464,7 +464,7 @@ int Mob::MonkSpecialAttack(Mob* other, uint8 unchecked_type)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Invalid special attack type %d attempted", unchecked_type);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Attack, "Invalid special attack type %d attempted", unchecked_type);
|
||||
return(1000); /* nice long delay for them, the caller depends on this! */
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
//make sure the attack and ranged timers are up
|
||||
//if the ranged timer is disabled, then they have no ranged weapon and shouldent be attacking anyhow
|
||||
if(!CanDoubleAttack && ((attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check()))) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
// The server and client timers are not exact matches currently, so this would spam too often if enabled
|
||||
//Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
return;
|
||||
@@ -695,12 +695,12 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
const ItemInst* Ammo = m_inv[MainAmmo];
|
||||
|
||||
if (!RangeWeapon || !RangeWeapon->IsType(ItemClassCommon)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(MainRange), MainRange);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(MainRange), MainRange);
|
||||
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have no bow!", GetItemIDAt(MainRange));
|
||||
return;
|
||||
}
|
||||
if (!Ammo || !Ammo->IsType(ItemClassCommon)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Missing or invalid ammo item (%d) in slot %d", GetItemIDAt(MainAmmo), MainAmmo);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Missing or invalid ammo item (%d) in slot %d", GetItemIDAt(MainAmmo), MainAmmo);
|
||||
Message(0, "Error: Ammo: GetItem(%i)==0, you have no ammo!", GetItemIDAt(MainAmmo));
|
||||
return;
|
||||
}
|
||||
@@ -709,17 +709,17 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
const Item_Struct* AmmoItem = Ammo->GetItem();
|
||||
|
||||
if(RangeItem->ItemType != ItemTypeBow) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Ranged item is not a bow. type %d.", RangeItem->ItemType);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Ranged item is not a bow. type %d.", RangeItem->ItemType);
|
||||
Message(0, "Error: Rangeweapon: Item %d is not a bow.", RangeWeapon->GetID());
|
||||
return;
|
||||
}
|
||||
if(AmmoItem->ItemType != ItemTypeArrow) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Ammo item is not an arrow. type %d.", AmmoItem->ItemType);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Ammo item is not an arrow. type %d.", AmmoItem->ItemType);
|
||||
Message(0, "Error: Ammo: type %d != %d, you have the wrong type of ammo!", AmmoItem->ItemType, ItemTypeArrow);
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Shooting %s with bow %s (%d) and arrow %s (%d)", other->GetName(), RangeItem->Name, RangeItem->ID, AmmoItem->Name, AmmoItem->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Shooting %s with bow %s (%d) and arrow %s (%d)", other->GetName(), RangeItem->Name, RangeItem->ID, AmmoItem->Name, AmmoItem->ID);
|
||||
|
||||
//look for ammo in inventory if we only have 1 left...
|
||||
if(Ammo->GetCharges() == 1) {
|
||||
@@ -746,7 +746,7 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
Ammo = baginst;
|
||||
ammo_slot = m_inv.CalcSlotId(r, i);
|
||||
found = true;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from quiver stack at slot %d. %d in stack.", ammo_slot, Ammo->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from quiver stack at slot %d. %d in stack.", ammo_slot, Ammo->GetCharges());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -761,17 +761,17 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
if (aslot != INVALID_INDEX) {
|
||||
ammo_slot = aslot;
|
||||
Ammo = m_inv[aslot];
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from inventory stack at slot %d. %d in stack.", ammo_slot, Ammo->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from inventory stack at slot %d. %d in stack.", ammo_slot, Ammo->GetCharges());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float range = RangeItem->Range + AmmoItem->Range + GetRangeDistTargetSizeMod(GetTarget());
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Calculated bow range to be %.1f", range);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Calculated bow range to be %.1f", range);
|
||||
range *= range;
|
||||
float dist = DistNoRoot(*other);
|
||||
if(dist > range) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||
Message_StringID(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
return;
|
||||
}
|
||||
@@ -799,9 +799,9 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
|
||||
if (!ChanceAvoidConsume || (ChanceAvoidConsume < 100 && zone->random.Int(0,99) > ChanceAvoidConsume)){
|
||||
DeleteItemInInventory(ammo_slot, 1, true);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Consumed one arrow from slot %d", ammo_slot);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Consumed one arrow from slot %d", ammo_slot);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Endless Quiver prevented ammo consumption.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Endless Quiver prevented ammo consumption.");
|
||||
}
|
||||
|
||||
CheckIncreaseSkill(SkillArchery, GetTarget(), -15);
|
||||
@@ -873,7 +873,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
SendItemAnimation(other, AmmoItem, SkillArchery);
|
||||
|
||||
if (ProjectileMiss || (!ProjectileImpact && !other->CheckHitChance(this, SkillArchery, MainPrimary, chance_mod))) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack missed %s.", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack missed %s.", other->GetName());
|
||||
|
||||
if (LaunchProjectile){
|
||||
TryProjectileAttack(other, AmmoItem, SkillArchery, 0, RangeWeapon, Ammo, AmmoSlot, speed);
|
||||
@@ -882,7 +882,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
else
|
||||
other->Damage(this, 0, SPELL_UNKNOWN, SkillArchery);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack hit %s.", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack hit %s.", other->GetName());
|
||||
|
||||
bool HeadShot = false;
|
||||
uint32 HeadShot_Dmg = TryHeadShot(other, SkillArchery);
|
||||
@@ -923,7 +923,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
|
||||
MaxDmg += MaxDmg*bonusArcheryDamageModifier / 100;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Bow DMG %d, Arrow DMG %d, Max Damage %d.", WDmg, ADmg, MaxDmg);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Bow DMG %d, Arrow DMG %d, Max Damage %d.", WDmg, ADmg, MaxDmg);
|
||||
|
||||
bool dobonus = false;
|
||||
if(GetClass() == RANGER && GetLevel() > 50){
|
||||
@@ -944,7 +944,7 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
hate *= 2;
|
||||
MaxDmg = mod_archery_bonus_damage(MaxDmg, RangeWeapon);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranger. Double damage success roll, doubling damage to %d", MaxDmg);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranger. Double damage success roll, doubling damage to %d", MaxDmg);
|
||||
Message_StringID(MT_CritMelee, BOW_DOUBLE_DAMAGE);
|
||||
}
|
||||
}
|
||||
@@ -1192,7 +1192,7 @@ void NPC::RangedAttack(Mob* other)
|
||||
//make sure the attack and ranged timers are up
|
||||
//if the ranged timer is disabled, then they have no ranged weapon and shouldent be attacking anyhow
|
||||
if((attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check())){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Archery canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Archery canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
||||
//make sure the attack and ranged timers are up
|
||||
//if the ranged timer is disabled, then they have no ranged weapon and shouldent be attacking anyhow
|
||||
if((!CanDoubleAttack && (attack_timer.Enabled() && !attack_timer.Check(false)) || (ranged_timer.Enabled() && !ranged_timer.Check()))) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack canceled. Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
// The server and client timers are not exact matches currently, so this would spam too often if enabled
|
||||
//Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime());
|
||||
return;
|
||||
@@ -1371,19 +1371,19 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
||||
const ItemInst* RangeWeapon = m_inv[MainRange];
|
||||
|
||||
if (!RangeWeapon || !RangeWeapon->IsType(ItemClassCommon)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(MainRange), MainRange);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(MainRange), MainRange);
|
||||
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing to throw!", GetItemIDAt(MainRange));
|
||||
return;
|
||||
}
|
||||
|
||||
const Item_Struct* item = RangeWeapon->GetItem();
|
||||
if(item->ItemType != ItemTypeLargeThrowing && item->ItemType != ItemTypeSmallThrowing) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Ranged item %d is not a throwing weapon. type %d.", item->ItemType);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack canceled. Ranged item %d is not a throwing weapon. type %d.", item->ItemType);
|
||||
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing useful to throw!", GetItemIDAt(MainRange));
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing %s (%d) at %s", item->Name, item->ID, other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing %s (%d) at %s", item->Name, item->ID, other->GetName());
|
||||
|
||||
if(RangeWeapon->GetCharges() == 1) {
|
||||
//first check ammo
|
||||
@@ -1392,7 +1392,7 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
||||
//more in the ammo slot, use it
|
||||
RangeWeapon = AmmoItem;
|
||||
ammo_slot = MainAmmo;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from ammo slot, stack at slot %d. %d in stack.", ammo_slot, RangeWeapon->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from ammo slot, stack at slot %d. %d in stack.", ammo_slot, RangeWeapon->GetCharges());
|
||||
} else {
|
||||
//look through our inventory for more
|
||||
int32 aslot = m_inv.HasItem(item->ID, 1, invWherePersonal);
|
||||
@@ -1400,17 +1400,17 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
||||
//the item wont change, but the instance does, not that it matters
|
||||
ammo_slot = aslot;
|
||||
RangeWeapon = m_inv[aslot];
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from inventory slot, stack at slot %d. %d in stack.", ammo_slot, RangeWeapon->GetCharges());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Using ammo from inventory slot, stack at slot %d. %d in stack.", ammo_slot, RangeWeapon->GetCharges());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float range = item->Range + GetRangeDistTargetSizeMod(other);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Calculated bow range to be %.1f", range);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Calculated bow range to be %.1f", range);
|
||||
range *= range;
|
||||
float dist = DistNoRoot(*other);
|
||||
if(dist > range) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||
Message_StringID(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
return;
|
||||
}
|
||||
@@ -1489,7 +1489,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
SendItemAnimation(other, AmmoItem, SkillThrowing);
|
||||
|
||||
if (ProjectileMiss || (!ProjectileImpact && !other->CheckHitChance(this, SkillThrowing, MainPrimary, chance_mod))){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack missed %s.", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Ranged attack missed %s.", other->GetName());
|
||||
if (LaunchProjectile){
|
||||
TryProjectileAttack(other, AmmoItem, SkillThrowing, 0, RangeWeapon, nullptr, AmmoSlot, speed);
|
||||
return;
|
||||
@@ -1497,7 +1497,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
else
|
||||
other->Damage(this, 0, SPELL_UNKNOWN, SkillThrowing);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack hit %s.", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Throwing attack hit %s.", other->GetName());
|
||||
|
||||
int16 WDmg = 0;
|
||||
|
||||
@@ -1533,7 +1533,7 @@ void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Ite
|
||||
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, ASSASSINATES, GetName());
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Item DMG %d. Max Damage %d. Hit for damage %d", WDmg, MaxDmg, TotalDmg);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Item DMG %d. Max Damage %d. Hit for damage %d", WDmg, MaxDmg, TotalDmg);
|
||||
if (!Assassinate_Dmg)
|
||||
other->AvoidDamage(this, TotalDmg, false); //CanRiposte=false - Can not riposte throw attacks.
|
||||
|
||||
|
||||
+16
-16
@@ -476,7 +476,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
|
||||
if(!target_zone) {
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Succor/Evacuation Spell In Same Zone.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Succor/Evacuation Spell In Same Zone.");
|
||||
#endif
|
||||
if(IsClient())
|
||||
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), x, y, z, heading, 0, EvacToSafeCoords);
|
||||
@@ -485,7 +485,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
}
|
||||
else {
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Succor/Evacuation Spell To Another Zone.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Succor/Evacuation Spell To Another Zone.");
|
||||
#endif
|
||||
if(IsClient())
|
||||
CastToClient()->MovePC(target_zone, x, y, z, heading);
|
||||
@@ -711,7 +711,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
stun_resist += aabonuses.StunResist;
|
||||
|
||||
if (stun_resist <= 0 || zone->random.Int(0,99) >= stun_resist) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stunned. We had %d percent resist chance.", stun_resist);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stunned. We had %d percent resist chance.", stun_resist);
|
||||
|
||||
if (caster->IsClient())
|
||||
effect_value += effect_value*caster->GetFocusEffect(focusFcStunTimeMod, spell_id)/100;
|
||||
@@ -721,7 +721,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
if (IsClient())
|
||||
Message_StringID(MT_Stun, SHAKE_OFF_STUN);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun Resisted. We had %d percent resist chance.", stun_resist);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Combat, "Stun Resisted. We had %d percent resist chance.", stun_resist);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1649,7 +1649,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
if (IsCorpse() && CastToCorpse()->IsPlayerCorpse()) {
|
||||
|
||||
if(caster)
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, " corpse being rezzed using spell %i by %s",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, " corpse being rezzed using spell %i by %s",
|
||||
spell_id, caster->GetName());
|
||||
|
||||
CastToCorpse()->CastRezz(spell_id, caster);
|
||||
@@ -1772,7 +1772,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
}
|
||||
else {
|
||||
Message_StringID(4, TARGET_NOT_FOUND);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3065,7 +3065,7 @@ int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level,
|
||||
int mod = caster->GetInstrumentMod(spell_id);
|
||||
mod = ApplySpellEffectiveness(caster, spell_id, mod, true);
|
||||
effect_value = effect_value * mod / 10;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Effect value %d altered with bard modifier of %d to yeild %d", oval, mod, effect_value);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Effect value %d altered with bard modifier of %d to yeild %d", oval, mod, effect_value);
|
||||
}
|
||||
|
||||
effect_value = mod_effect_value(effect_value, spell_id, spells[spell_id].effectid[effect_id], caster);
|
||||
@@ -3127,7 +3127,7 @@ snare has both of them negative, yet their range should work the same:
|
||||
updownsign = 1;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "CSEV: spell %d, formula %d, base %d, max %d, lvl %d. Up/Down %d",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "CSEV: spell %d, formula %d, base %d, max %d, lvl %d. Up/Down %d",
|
||||
spell_id, formula, base, max, caster_level, updownsign);
|
||||
|
||||
switch(formula)
|
||||
@@ -3326,7 +3326,7 @@ snare has both of them negative, yet their range should work the same:
|
||||
result = ubase * (caster_level * (formula - 2000) + 1);
|
||||
}
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Unknown spell effect value forumula %d", formula);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Unknown spell effect value forumula %d", formula);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3351,7 +3351,7 @@ snare has both of them negative, yet their range should work the same:
|
||||
if (base < 0 && result > 0)
|
||||
result *= -1;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Result: %d (orig %d), cap %d %s", result, oresult, max, (base < 0 && result > 0)?"Inverted due to negative base":"");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Result: %d (orig %d), cap %d %s", result, oresult, max, (base < 0 && result > 0)?"Inverted due to negative base":"");
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -3383,18 +3383,18 @@ void Mob::BuffProcess()
|
||||
IsMezSpell(buffs[buffs_i].spellid) ||
|
||||
IsBlindSpell(buffs[buffs_i].spellid))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
|
||||
BuffFadeBySlot(buffs_i);
|
||||
}
|
||||
}
|
||||
else if (buffs[buffs_i].ticsremaining < 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
|
||||
BuffFadeBySlot(buffs_i);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Buff %d in slot %d has %d tics remaining.", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Buff %d in slot %d has %d tics remaining.", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining);
|
||||
}
|
||||
}
|
||||
else if(IsClient() && !(CastToClient()->GetClientVersionBit() & BIT_SoFAndLater))
|
||||
@@ -3759,7 +3759,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
if (IsClient() && !CastToClient()->IsDead())
|
||||
CastToClient()->MakeBuffFadePacket(buffs[slot].spellid, slot);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Fading buff %d from slot %d", buffs[slot].spellid, slot);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Fading buff %d from slot %d", buffs[slot].spellid, slot);
|
||||
|
||||
if(spells[buffs[slot].spellid].viral_targets > 0) {
|
||||
bool last_virus = true;
|
||||
@@ -4817,7 +4817,7 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "CalcFocusEffect: unknown limit spelltype %d", focus_spell.base[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "CalcFocusEffect: unknown limit spelltype %d", focus_spell.base[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -5156,7 +5156,7 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
||||
//this spits up a lot of garbage when calculating spell focuses
|
||||
//since they have all kinds of extra effects on them.
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "CalcFocusEffect: unknown effectid %d", focus_spell.effectid[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+176
-176
File diff suppressed because it is too large
Load Diff
+125
-125
@@ -74,7 +74,7 @@ bool TaskManager::LoadTaskSets() {
|
||||
MAXTASKSETS, MAXTASKS);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadTaskSets: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadTaskSets: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ bool TaskManager::LoadTaskSets() {
|
||||
int taskID = atoi(row[1]);
|
||||
|
||||
TaskSets[taskSet].push_back(taskID);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Adding TaskID %4i to TaskSet %4i", taskID, taskSet);
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadSingleTask(%i)", TaskID);
|
||||
Log.DoLog(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())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
}
|
||||
|
||||
bool TaskManager::LoadTasks(int singleTask) {
|
||||
|
||||
// If TaskID !=0, then just load the task specified.
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadTasks Called");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskManager::LoadTasks Called");
|
||||
|
||||
std::string query;
|
||||
if(singleTask == 0) {
|
||||
if(!GoalListManager.LoadLists())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadLists failed");
|
||||
|
||||
if(!LoadTaskSets())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadTaskSets failed");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::LoadTasks LoadTaskSets failed");
|
||||
|
||||
query = StringFormat("SELECT `id`, `duration`, `title`, `description`, `reward`, "
|
||||
"`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, "
|
||||
@@ -146,7 +146,7 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
|
||||
if((taskID <= 0) || (taskID >= MAXTASKS)) {
|
||||
// This shouldn't happen, as the SELECT is bounded by MAXTASKS
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading tasks from database", taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading tasks from database", taskID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -179,11 +179,11 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
Tasks[taskID]->SequenceMode = ActivitiesSequential;
|
||||
Tasks[taskID]->LastStep = 0;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i Repeatable: %s",
|
||||
Log.DoLog(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");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title);
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
"ORDER BY taskid, activityid ASC", singleTask, MAXACTIVITIESPERTASK);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -215,13 +215,13 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
|
||||
if((taskID <= 0) || (taskID >= MAXTASKS) || (activityID < 0) || (activityID >= MAXACTIVITIESPERTASK)) {
|
||||
// This shouldn't happen, as the SELECT is bounded by MAXTASKS
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task or Activity ID (%i, %i) out of range while loading "
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task or Activity ID (%i, %i) out of range while loading "
|
||||
"activities from database", taskID, activityID);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(Tasks[taskID]==nullptr) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", taskID, activityID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", taskID, activityID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ bool TaskManager::LoadTasks(int singleTask) {
|
||||
// ERR_NOTASK errors.
|
||||
// Change to (activityID != (Tasks[taskID]->ActivityCount + 1)) to index from 1
|
||||
if(activityID != Tasks[taskID]->ActivityCount) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, activityID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, activityID);
|
||||
Tasks[taskID] = nullptr;
|
||||
continue;
|
||||
}
|
||||
@@ -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]);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Activity Slot %2i: ID %i for Task %5i. Type: %3i, GoalID: %8i, "
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text1: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text2: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text3: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text1: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Text2: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2);
|
||||
Log.DoLog(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();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::SaveClientState for character ID %d", characterID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tasks,"TaskManager::SaveClientState for character ID %d", characterID);
|
||||
|
||||
if(state->ActiveTaskCount > 0) {
|
||||
for(int task=0; task<MAXACTIVETASKS; task++) {
|
||||
@@ -316,14 +316,14 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
if(state->ActiveTasks[task].Updated) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex %i TaskID %i", characterID, task, taskID);
|
||||
Log.DoLog(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)",
|
||||
characterID, taskID, task, state->ActiveTasks[task].AcceptedTime);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
else
|
||||
state->ActiveTasks[task].Updated = false;
|
||||
|
||||
@@ -338,7 +338,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
if(!state->ActiveTasks[task].Activity[activityIndex].Updated)
|
||||
continue;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity %i, %i",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity %i, %i",
|
||||
characterID, task, activityIndex);
|
||||
|
||||
if(updatedActivityCount==0)
|
||||
@@ -358,11 +358,11 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
if(updatedActivityCount == 0)
|
||||
continue;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] Executing query %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] Executing query %s", query.c_str());
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
for(unsigned int i=state->LastCompletedTaskLoaded; i<state->CompletedTasks.size(); i++) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState Saving Completed Task at slot %i", i);
|
||||
Log.DoLog(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))
|
||||
@@ -396,7 +396,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
std::string query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, -1);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) {
|
||||
query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, j);
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -459,14 +459,14 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
state->ActiveTaskCount = 0;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState for character ID %d", characterID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState for character ID %d", characterID);
|
||||
|
||||
std::string query = StringFormat("SELECT `taskid`, `slot`, `acceptedtime` "
|
||||
"FROM `character_tasks` "
|
||||
"WHERE `charid` = %i ORDER BY acceptedtime", characterID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -475,17 +475,17 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
int slot = atoi(row[1]);
|
||||
|
||||
if((taskID<0) || (taskID>=MAXTASKS)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character tasks from database", taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character tasks from database", taskID);
|
||||
continue;
|
||||
}
|
||||
|
||||
if((slot<0) || (slot>=MAXACTIVETASKS)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(state->ActiveTasks[slot].TaskID != TASKSLOTEMPTY) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -501,11 +501,11 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
++state->ActiveTaskCount;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, taskID, acceptedtime);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, taskID, acceptedtime);
|
||||
}
|
||||
|
||||
// Load Activities
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState. Loading activities for character ID %d", characterID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState. Loading activities for character ID %d", characterID);
|
||||
|
||||
query = StringFormat("SELECT `taskid`, `activityid`, `donecount`, `completed` "
|
||||
"FROM `character_activities` "
|
||||
@@ -513,20 +513,20 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
"ORDER BY `taskid` ASC, `activityid` ASC", characterID);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()){
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Activities: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Activities: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
int taskID = atoi(row[0]);
|
||||
if((taskID<0) || (taskID>=MAXTASKS)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character activities from database", taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character activities from database", taskID);
|
||||
continue;
|
||||
}
|
||||
|
||||
int activityID = atoi(row[1]);
|
||||
if((activityID<0) || (activityID>=MAXACTIVITIESPERTASK)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading character activities from database", activityID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading character activities from database", activityID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
}
|
||||
|
||||
if(activeTaskIndex == -1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -555,7 +555,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
state->ActiveTasks[activeTaskIndex].Activity[activityID].Updated = false;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, Completed: %i", characterID, taskID, activityID, doneCount, completed);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, Completed: %i", characterID, taskID, activityID, doneCount, completed);
|
||||
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
characterID);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
|
||||
int taskID = atoi(row[0]);
|
||||
if((taskID <= 0) || (taskID >=MAXTASKS)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading completed tasks from database", taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading completed tasks from database", taskID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
// completed.
|
||||
int activityID = atoi(row[1]);
|
||||
if((activityID<-1) || (activityID>=MAXACTIVITIESPERTASK)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading completed tasks from database", activityID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading completed tasks from database", activityID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -634,12 +634,12 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
characterID, MAXTASKS);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", results.ErrorMessage().c_str());
|
||||
else
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
int taskID = atoi(row[0]);
|
||||
state->EnabledTasks.push_back(taskID);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] Adding TaskID %i to enabled tasks", taskID);
|
||||
Log.DoLog(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
|
||||
@@ -652,7 +652,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
c->Message(13, "Active Task Slot %i, references a task (%i), that does not exist. "
|
||||
"Removing from memory. Contact a GM to resolve this.",i, taskID);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID);
|
||||
state->ActiveTasks[i].TaskID=TASKSLOTEMPTY;
|
||||
continue;
|
||||
|
||||
@@ -664,7 +664,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
"Removing from memory. Contact a GM to resolve this.",
|
||||
taskID, Tasks[taskID]->Title);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Fatal error in character %i task state. Activity %i for "
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Fatal error in character %i task state. Activity %i for "
|
||||
"Task %i either missing from client state or from task.", characterID, j, taskID);
|
||||
state->ActiveTasks[i].TaskID=TASKSLOTEMPTY;
|
||||
break;
|
||||
@@ -676,7 +676,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) {
|
||||
if(state->ActiveTasks[i].TaskID != TASKSLOTEMPTY)
|
||||
state->UnlockActivities(characterID, i);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[CLIENTLOAD] LoadClientState for Character ID %d DONE!", characterID);
|
||||
Log.DoLog(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) {
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
for(unsigned int i=0; i<EnabledTasks.size(); i++)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
|
||||
if(tasksEnabled.size() == 0 )
|
||||
return;
|
||||
@@ -722,10 +722,10 @@ void ClientTaskState::EnableTask(int characterID, int taskCount, int *tasks) {
|
||||
queryStream << ( i ? ", " : "" ) << StringFormat("(%i, %i)", characterID, tasksEnabled[i]);
|
||||
|
||||
std::string query = queryStream.str();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::EnableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, 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) {
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] New enabled task list ");
|
||||
for(unsigned int i=0; i<EnabledTasks.size(); i++)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] %i", EnabledTasks[i]);
|
||||
|
||||
if(tasksDisabled.size() == 0)
|
||||
return;
|
||||
@@ -771,10 +771,10 @@ void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) {
|
||||
|
||||
queryStream << ")";
|
||||
std::string query = queryStream.str();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::DisableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::DisableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
bool ClientTaskState::IsTaskEnabled(int TaskID) {
|
||||
@@ -908,7 +908,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
|
||||
int TaskListIndex = 0;
|
||||
int PlayerLevel = c->GetLevel();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSetSelector called for taskset %i. EnableTaskSize is %i", TaskSetID,
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSets[%i][0] == 0. All Tasks in Set enabled.", TaskSetID);
|
||||
Log.DoLog(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)) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Comparing EnabledTasks[%i] (%i) with TaskSets[%i][%i] (%i)",
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount);
|
||||
|
||||
int PlayerLevel = c->GetLevel();
|
||||
|
||||
@@ -1275,16 +1275,16 @@ int ClientTaskState::GetActiveTaskID(int index) {
|
||||
|
||||
static void DeleteCompletedTaskFromDatabase(int charID, int taskID) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] DeleteCompletedTasksFromDatabase. CharID = %i, TaskID = %i", charID, taskID);
|
||||
Log.DoLog(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);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in CientTaskState::CancelTask %s, %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Error in CientTaskState::CancelTask %s, %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Delete query %s", query.c_str());
|
||||
Log.DoLog(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.
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CharID: %i Task: %i Sequence mode is %i",
|
||||
Log.DoLog(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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] KeepOneRecord enabled");
|
||||
Log.DoLog(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;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements);
|
||||
Log.DoLog(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);
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Returning sequential task, AllActivitiesComplete is %i", AllActivitiesComplete);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", ActiveTasks[TaskIndex].CurrentStep, Task->LastStep);
|
||||
Log.DoLog(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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] KeepOneRecord enabled");
|
||||
Log.DoLog(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;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasks for NPCTypeID: %d", NPCTypeID);
|
||||
Log.DoLog(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())) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone check",
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Calling increment done count ByNPC");
|
||||
Log.DoLog(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.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForItem(%d,%d)", Type, ItemID);
|
||||
Log.DoLog(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())) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Activity type %i for Item %i failed zone check",
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Calling increment done count ForItem");
|
||||
Log.DoLog(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.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnExplore(%i)", ExploreID);
|
||||
Log.DoLog(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())) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Explore exploreid %i failed zone check",
|
||||
Log.DoLog(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?)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on explore");
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForOnDeliver(%d)", NPCTypeID);
|
||||
Log.DoLog(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())) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Deliver activity failed zone check (current zone %i, need zone %i",
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on GiveCash");
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on GiveItem");
|
||||
Log.DoLog(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.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnTouch(%i)", ZoneID);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Char: %s Touch activity failed zone check",
|
||||
Log.DoLog(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?)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment on Touch");
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] IncrementDoneCount");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Done (%i) = Goal (%i) for Activity %i",
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskCompleted is %i", TaskComplete);
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] FailTask %i, ActiveTaskCount is %i", TaskID, ActiveTaskCount);
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i).", TaskID, ActivityID);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i). State is %i ", TaskID, ActivityID,
|
||||
Log.DoLog(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*/)
|
||||
{
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, %i).", TaskID, ActivityID, Count);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Increment done count on UpdateTaskActivity");
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, 0).", TaskID, ActivityID);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ResetTaskActivityCount");
|
||||
Log.DoLog(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++) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Comparing completed task %i with %i", CompletedTasks[i].TaskID, TaskID);
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Task History Requested for Completed Task Index %i", TaskIndex);
|
||||
Log.DoLog(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.
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskFailed");
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Completed Task Count: %i, First Task to send is %i, Last is %i",
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID));
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex);
|
||||
Log.DoLog(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);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] SendSingleActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID));
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask");
|
||||
_pkt(TASKS__PACKETS, outapp);
|
||||
|
||||
c->QueuePacket(outapp);
|
||||
@@ -2932,24 +2932,24 @@ void ClientTaskState::CancelTask(Client *c, int SequenceNumber, bool RemoveFromD
|
||||
void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) {
|
||||
|
||||
int characterID = c->CharacterID();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState Cancel Task %i ", sequenceNumber);
|
||||
Log.DoLog(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);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask: %s", query.c_str());
|
||||
Log.DoLog(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);
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] CancelTask: %s", query.c_str());
|
||||
Log.DoLog(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++) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] ClientTaskState Looking for free slot in slot %i, found TaskID of %i",
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Checking proximities for Position %8.3f, %8.3f, %8.3f\n", X, Y, Z);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[PROXIMITY] Position %8.3f, %8.3f, %8.3f is within proximity %i\n", X, Y, Z, ExploreID);
|
||||
Log.DoLog(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() {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskGoalListManager::LoadLists Called");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskGoalListManager::LoadLists Called");
|
||||
|
||||
for(int i=0; i< NumberOfLists; i++)
|
||||
safe_delete_array(TaskGoalLists[i].GoalItemEntries);
|
||||
@@ -3088,12 +3088,12 @@ bool TaskGoalListManager::LoadLists() {
|
||||
"ORDER BY `listid`";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
NumberOfLists = results.RowCount();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Database returned a count of %i lists", NumberOfLists);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Database returned a count of %i lists", NumberOfLists);
|
||||
|
||||
TaskGoalLists = new TaskGoalList_Struct[NumberOfLists];
|
||||
|
||||
@@ -3122,7 +3122,7 @@ bool TaskGoalListManager::LoadLists() {
|
||||
listID, size);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str());
|
||||
TaskGoalLists[listIndex].Size = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -3207,7 +3207,7 @@ std::vector<int> TaskGoalListManager::GetListContents(int ListID) {
|
||||
|
||||
bool TaskGoalListManager::IsInList(int ListID, int Entry) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i)", ListID, Entry);
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i) returning true", ListIndex, Entry);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskProximityManager::LoadProximities Called for zone %i", zoneID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] TaskProximityManager::LoadProximities Called for zone %i", zoneID);
|
||||
TaskProximities.clear();
|
||||
|
||||
std::string query = StringFormat("SELECT `exploreid`, `minx`, `maxx`, "
|
||||
@@ -3259,7 +3259,7 @@ bool TaskProximityManager::LoadProximities(int zoneID) {
|
||||
"ORDER BY `zoneid` ASC", zoneID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TaskProximityManager::LoadProximities %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TaskProximityManager::LoadProximities %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3285,7 +3285,7 @@ int TaskProximityManager::CheckProximities(float X, float Y, float Z) {
|
||||
|
||||
TaskProximity* P = &TaskProximities[i];
|
||||
|
||||
Log.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",
|
||||
Log.DoLog(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 ||
|
||||
|
||||
+6
-6
@@ -40,7 +40,7 @@ bool TitleManager::LoadTitles()
|
||||
"`status`, `item_id`, `prefix`, `suffix`, `title_set` FROM titles";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load titles: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load titles: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ void TitleManager::CreateNewPlayerTitle(Client *client, const char *title)
|
||||
safe_delete_array(escTitle);
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding title: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding title: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ void TitleManager::CreateNewPlayerSuffix(Client *client, const char *suffix)
|
||||
safe_delete_array(escSuffix);
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding title suffix: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding title suffix: %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ void Client::EnableTitle(int titleSet) {
|
||||
CharacterID(), titleSet);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in EnableTitle query for titleset %i and charid %i", titleSet, CharacterID());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in EnableTitle query for titleset %i and charid %i", titleSet, CharacterID());
|
||||
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ bool Client::CheckTitle(int titleSet) {
|
||||
titleSet, CharacterID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CheckTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CheckTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ void Client::RemoveTitle(int titleSet) {
|
||||
titleSet, CharacterID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in RemoveTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in RemoveTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
|
||||
+41
-41
@@ -42,7 +42,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
{
|
||||
if (!user || !in_augment)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client or AugmentItem_Struct not set in Object::HandleAugmentation");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Client or AugmentItem_Struct not set in Object::HandleAugmentation");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
|
||||
if(!container)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Player tried to augment an item without a container set.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Player tried to augment an item without a container set.");
|
||||
user->Message(13, "Error: This item is not a container!");
|
||||
return;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Object *worldo)
|
||||
{
|
||||
if (!user || !in_combine) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client or NewCombine_Struct not set in Object::HandleCombine");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Client or NewCombine_Struct not set in Object::HandleCombine");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
||||
if(success && spec.replace_container) {
|
||||
if(worldcontainer){
|
||||
//should report this error, but we dont have the recipe ID, so its not very useful
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Replace container combine executed in a world container.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Replace container combine executed in a world container.");
|
||||
}
|
||||
else
|
||||
user->DeleteItemInInventory(in_combine->container_slot, 0, true);
|
||||
@@ -444,7 +444,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
||||
//ask the database for the recipe to make sure it exists...
|
||||
DBTradeskillRecipe_Struct spec;
|
||||
if (!database.GetTradeRecipe(rac->recipe_id, rac->object_type, rac->some_id, user->CharacterID(), &spec)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown recipe for HandleAutoCombine: %u\n", rac->recipe_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown recipe for HandleAutoCombine: %u\n", rac->recipe_id);
|
||||
user->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
@@ -467,21 +467,21 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
||||
rac->recipe_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
user->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
if(results.RowCount() < 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine: no components returned");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine: no components returned");
|
||||
user->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
if(results.RowCount() > 10) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine: too many components returned (%u)", results.RowCount());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine: too many components returned (%u)", results.RowCount());
|
||||
user->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
@@ -676,7 +676,7 @@ void Client::TradeskillSearchResults(const std::string query, unsigned long objt
|
||||
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ void Client::TradeskillSearchResults(const std::string query, unsigned long objt
|
||||
return; //search gave no results... not an error
|
||||
|
||||
if(results.ColumnCount() != 6) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': Invalid column count in result", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': Invalid column count in result", query.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -730,17 +730,17 @@ void Client::SendTradeskillDetails(uint32 recipe_id) {
|
||||
recipe_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if(results.RowCount() < 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails: no components returned");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails: no components returned");
|
||||
return;
|
||||
}
|
||||
|
||||
if(results.RowCount() > 10) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails: too many components returned (%u)", results.RowCount());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails: too many components returned (%u)", results.RowCount());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -901,7 +901,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
//handle caps
|
||||
if(spec->nofail) {
|
||||
chance = 100; //cannot fail.
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...This combine cannot fail.");
|
||||
Log.DoLog(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;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Current skill: %d , Trivial: %d , Success chance: %f percent", user_skill , spec->trivial , chance);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Bonusstat: %d , INT: %d , WIS: %d , DEX: %d , STR: %d", bonusstat , GetINT() , GetWIS() , GetDEX() , GetSTR());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Current skill: %d , Trivial: %d , Success chance: %f percent", user_skill , spec->trivial , chance);
|
||||
Log.DoLog(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());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "Tradeskill success");
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "Tradeskill failed");
|
||||
Log.DoLog(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();
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...skillup_modifier: %f , success_modifier: %d , stat modifier: %d", skillup_modifier , success_modifier , stat_modifier);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage1 chance was: %f percent", chance_stage1);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage2 chance was: %f percent. 0 percent means stage1 failed", chance_stage2);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...skillup_modifier: %f , success_modifier: %d , stat modifier: %d", skillup_modifier , success_modifier , stat_modifier);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Tradeskills, "...Stage1 chance was: %f percent", chance_stage1);
|
||||
Log.DoLog(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,
|
||||
@@ -1232,8 +1232,8 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
buf2.c_str(), containers.c_str(), count, sum);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe search, query: %s", query.c_str());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe search, error: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe search, query: %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe search, error: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
|
||||
//length limit on buf2
|
||||
if(index == 214) { //Maximum number of recipe matches (19 * 215 = 4096)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "GetTradeRecipe warning: Too many matches. Unable to search all recipe entries. Searched %u of %u possible entries.", index + 1, results.RowCount());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "GetTradeRecipe warning: Too many matches. Unable to search all recipe entries. Searched %u of %u possible entries.", index + 1, results.RowCount());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1266,8 +1266,8 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
"AND sum(tre.item_id * tre.componentcount) = %u", buf2.c_str(), count, sum);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1292,18 +1292,18 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
"AND tre.item_id = %u;", buf2.c_str(), containerId);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if(results.RowCount() == 0) { //Recipe contents matched more than 1 recipe, but not in this container
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Combine error: Incorrect container is being used!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Combine error: Incorrect container is being used!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (results.RowCount() > 1) //Recipe contents matched more than 1 recipe in this container
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Combine error: Recipe is not unique! %u matches found for container %u. Continuing with first recipe match.", results.RowCount(), containerId);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Combine error: Recipe is not unique! %u matches found for container %u. Continuing with first recipe match.", results.RowCount(), containerId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1320,7 +1320,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
|
||||
recipe_id);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in tradeskill verify query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in tradeskill verify query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return GetTradeRecipe(recipe_id, c_type, some_id, char_id, spec);
|
||||
}
|
||||
|
||||
@@ -1375,8 +1375,8 @@ bool ZoneDatabase::GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id
|
||||
char_id, (unsigned long)recipe_id, containers.c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, query: %s", query.c_str());
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, query: %s", query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1407,12 +1407,12 @@ bool ZoneDatabase::GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id
|
||||
"WHERE successcount > 0 AND recipe_id = %u", recipe_id);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecept success query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecept success query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if(results.RowCount() < 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecept success: no success items returned");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecept success: no success items returned");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1464,7 +1464,7 @@ void ZoneDatabase::UpdateRecipeMadecount(uint32 recipe_id, uint32 char_id, uint3
|
||||
recipe_id, char_id, madeCount, madeCount);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateRecipeMadecount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateRecipeMadecount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Client::LearnRecipe(uint32 recipeID)
|
||||
@@ -1477,12 +1477,12 @@ void Client::LearnRecipe(uint32 recipeID)
|
||||
"WHERE tr.id = %u ;", CharacterID(), recipeID);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Client::LearnRecipe - RecipeID: %d had %d occurences.", recipeID, results.RowCount());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Client::LearnRecipe - RecipeID: %d had %d occurences.", recipeID, results.RowCount());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1503,7 +1503,7 @@ void Client::LearnRecipe(uint32 recipeID)
|
||||
recipeID, CharacterID());
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -1553,7 +1553,7 @@ bool ZoneDatabase::EnableRecipe(uint32 recipe_id)
|
||||
"WHERE id = %u;", recipe_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in EnableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in EnableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
return results.RowsAffected() > 0;
|
||||
}
|
||||
@@ -1564,7 +1564,7 @@ bool ZoneDatabase::DisableRecipe(uint32 recipe_id)
|
||||
"WHERE id = %u;", recipe_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DisableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DisableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
return results.RowsAffected() > 0;
|
||||
}
|
||||
|
||||
+61
-61
@@ -86,7 +86,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
|
||||
|
||||
if (!owner || !owner->IsClient()) {
|
||||
// This should never happen
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Programming error: NPC's should not call Trade::AddEntity()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Programming error: NPC's should not call Trade::AddEntity()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
|
||||
inst2->SetCharges(stack_size + inst2->GetCharges());
|
||||
}
|
||||
|
||||
Log.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);
|
||||
Log.DoLog(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);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s added item '%s' to trade slot %i", owner->GetName(), inst->GetItem()->Name, trade_slot_id);
|
||||
Log.DoLog(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);
|
||||
@@ -296,7 +296,7 @@ void Trade::LogTrade()
|
||||
void Trade::DumpTrade()
|
||||
{
|
||||
Mob* with = With();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Dumping trade data: '%s' in TradeState %i with '%s'",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Dumping trade data: '%s' in TradeState %i with '%s'",
|
||||
this->owner->GetName(), state, ((with==nullptr)?"(null)":with->GetName()));
|
||||
|
||||
if (!owner->IsClient())
|
||||
@@ -307,7 +307,7 @@ void Trade::DumpTrade()
|
||||
const ItemInst* inst = trader->GetInv().GetItem(i);
|
||||
|
||||
if (inst) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Item %i (Charges=%i, Slot=%i, IsBag=%s)",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Item %i (Charges=%i, Slot=%i, IsBag=%s)",
|
||||
inst->GetItem()->ID, inst->GetCharges(),
|
||||
i, ((inst->IsType(ItemClassContainer)) ? "True" : "False"));
|
||||
|
||||
@@ -315,7 +315,7 @@ void Trade::DumpTrade()
|
||||
for (uint8 j = SUB_BEGIN; j < EmuConstants::ITEM_CONTAINER_SIZE; j++) {
|
||||
inst = trader->GetInv().GetItem(i, j);
|
||||
if (inst) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "\tBagItem %i (Charges=%i, Slot=%i)",
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "\tBagItem %i (Charges=%i, Slot=%i)",
|
||||
inst->GetItem()->ID, inst->GetCharges(),
|
||||
Inventory::CalcSlotId(i, j));
|
||||
}
|
||||
@@ -324,7 +324,7 @@ void Trade::DumpTrade()
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "\tpp:%i, gp:%i, sp:%i, cp:%i", pp, gp, sp, cp);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "\tpp:%i, gp:%i, sp:%i, cp:%i", pp, gp, sp, cp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -368,7 +368,7 @@ void Client::ResetTrade() {
|
||||
break;
|
||||
|
||||
if (partial_inst->GetID() != inst->GetID()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::ResetTrade() - an incompatible location reference was returned by Inventory::FindFreeSlotForTradeItem()");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::ResetTrade() - an incompatible location reference was returned by Inventory::FindFreeSlotForTradeItem()");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
bool qs_log = false;
|
||||
|
||||
if(other) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Finishing trade with client %s", other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Finishing trade with client %s", other->GetName());
|
||||
|
||||
this->AddMoneyToPP(other->trade->cp, other->trade->sp, other->trade->gp, other->trade->pp, true);
|
||||
|
||||
@@ -491,7 +491,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
const ItemInst* inst = m_inv[trade_slot];
|
||||
|
||||
if (inst && inst->IsType(ItemClassContainer)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Giving container %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, trade_slot, other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Giving container %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, trade_slot, other->GetName());
|
||||
|
||||
// TODO: need to check bag items/augments for no drop..everything for attuned...
|
||||
if (inst->GetItem()->NoDrop != 0 || Admin() >= RuleI(Character, MinStatusForNoDropExemptions) || RuleI(World, FVNoDropFlag) == 1 || other == this) {
|
||||
@@ -499,7 +499,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
|
||||
if (free_slot != INVALID_INDEX) {
|
||||
if (other->PutItemInInventory(free_slot, *inst, true)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Container %s (%d) successfully transferred, deleting from trade slot.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Container %s (%d) successfully transferred, deleting from trade slot.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
if (qs_log) {
|
||||
QSTradeItems_Struct* detail = new QSTradeItems_Struct;
|
||||
|
||||
@@ -552,17 +552,17 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transfer of container %s (%d) to %s failed, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID, other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transfer of container %s (%d) to %s failed, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID, other->GetName());
|
||||
PushItemOnCursor(*inst, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s's inventory is full, returning container %s (%d) to giver.", other->GetName(), inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s's inventory is full, returning container %s (%d) to giver.", other->GetName(), inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
PushItemOnCursor(*inst, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Container %s (%d) is NoDrop, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Container %s (%d) is NoDrop, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
PushItemOnCursor(*inst, true);
|
||||
}
|
||||
|
||||
@@ -588,7 +588,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
break;
|
||||
|
||||
if (partial_inst->GetID() != inst->GetID()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::ResetTrade() - an incompatible location reference was returned by Inventory::FindFreeSlotForTradeItem()");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::ResetTrade() - an incompatible location reference was returned by Inventory::FindFreeSlotForTradeItem()");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -606,10 +606,10 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
inst->SetCharges(0);
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transferring partial stack %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, trade_slot, other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transferring partial stack %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, trade_slot, other->GetName());
|
||||
|
||||
if (other->PutItemInInventory(partial_slot, *partial_inst, true)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Partial stack %s (%d) successfully transferred, deleting %i charges from trade slot.",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Partial stack %s (%d) successfully transferred, deleting %i charges from trade slot.",
|
||||
inst->GetItem()->Name, inst->GetItem()->ID, (old_charges - inst->GetCharges()));
|
||||
if (qs_log) {
|
||||
QSTradeItems_Struct* detail = new QSTradeItems_Struct;
|
||||
@@ -635,7 +635,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transfer of partial stack %s (%d) to %s failed, returning %i charges to trade slot.",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transfer of partial stack %s (%d) to %s failed, returning %i charges to trade slot.",
|
||||
inst->GetItem()->Name, inst->GetItem()->ID, other->GetName(), (old_charges - inst->GetCharges()));
|
||||
|
||||
inst->SetCharges(old_charges);
|
||||
@@ -710,7 +710,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
const ItemInst* inst = m_inv[trade_slot];
|
||||
|
||||
if (inst) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Giving item %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, trade_slot, other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Giving item %s (%d) in slot %d to %s", inst->GetItem()->Name, inst->GetItem()->ID, trade_slot, other->GetName());
|
||||
|
||||
// TODO: need to check bag items/augments for no drop..everything for attuned...
|
||||
if (inst->GetItem()->NoDrop != 0 || Admin() >= RuleI(Character, MinStatusForNoDropExemptions) || RuleI(World, FVNoDropFlag) == 1 || other == this) {
|
||||
@@ -718,7 +718,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
|
||||
if (free_slot != INVALID_INDEX) {
|
||||
if (other->PutItemInInventory(free_slot, *inst, true)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item %s (%d) successfully transferred, deleting from trade slot.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item %s (%d) successfully transferred, deleting from trade slot.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
if (qs_log) {
|
||||
QSTradeItems_Struct* detail = new QSTradeItems_Struct;
|
||||
|
||||
@@ -772,17 +772,17 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transfer of Item %s (%d) to %s failed, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID, other->GetName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Transfer of Item %s (%d) to %s failed, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID, other->GetName());
|
||||
PushItemOnCursor(*inst, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s's inventory is full, returning item %s (%d) to giver.", other->GetName(), inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "%s's inventory is full, returning item %s (%d) to giver.", other->GetName(), inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
PushItemOnCursor(*inst, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item %s (%d) is NoDrop, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item %s (%d) is NoDrop, returning to giver.", inst->GetItem()->Name, inst->GetItem()->ID);
|
||||
PushItemOnCursor(*inst, true);
|
||||
}
|
||||
|
||||
@@ -1160,7 +1160,7 @@ void Client::SendTraderItem(uint32 ItemID, uint16 Quantity) {
|
||||
const Item_Struct* item = database.GetItem(ItemID);
|
||||
|
||||
if(!item){
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bogus item deleted in Client::SendTraderItem!\n");
|
||||
Log.DoLog(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
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr inst pointer");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr inst pointer");
|
||||
}
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::BulkSendTraderInventory nullptr item pointer or item is NODROP %8X",item);
|
||||
Log.DoLog(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){
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::FindTraderItemBySerialNumber Couldn't find item! Serial No. was %i", SerialNumber);
|
||||
Log.DoLog(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){
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Could NOT find a match for Item: %i with a quantity of: %i on Trader: %s\n",
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "NukeTraderItem(Slot %i, Charges %i, Quantity %i", Slot, Charges, Quantity);
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "FindAndNuke %s, Charges %i, Quantity %i", item->GetItem()->Name, Charges, Quantity);
|
||||
Log.DoLog(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*
|
||||
|
||||
}
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Could NOT find a match for Item: %i with a quantity of: %i on Trader: %s\n",SerialNumber,
|
||||
Log.DoLog(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());
|
||||
}
|
||||
|
||||
@@ -1486,7 +1486,7 @@ static void BazaarAuditTrail(const char *seller, const char *buyer, const char *
|
||||
seller, buyer, itemName, quantity, totalCost, tranType);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Audit write error: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Audit write error: %s : %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -1510,13 +1510,13 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs,Client* Trader,const EQApplicat
|
||||
const ItemInst* BuyItem = Trader->FindTraderItemBySerialNumber(tbs->ItemID);
|
||||
|
||||
if(!BuyItem) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item on trader.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item on trader.");
|
||||
TradeRequestFailed(app);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Buyitem: Name: %s, IsStackable: %i, Requested Quantity: %i, Charges on Item %i",
|
||||
Log.DoLog(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,12 +1534,12 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs,Client* Trader,const EQApplicat
|
||||
outtbs->Quantity = tbs->Quantity;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Actual quantity that will be traded is %i", outtbs->Quantity);
|
||||
Log.DoLog(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");
|
||||
Trader->Message(13, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Bazaar: Zero price transaction between %s and %s aborted."
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Bazaar: Zero price transaction between %s and %s aborted."
|
||||
"Item: %s, Charges: %i, TBS: Qty %i, Price: %i",
|
||||
GetName(), Trader->GetName(),
|
||||
BuyItem->GetItem()->Name, BuyItem->GetCharges(), tbs->Quantity, tbs->Price);
|
||||
@@ -1836,11 +1836,11 @@ void Client::SendBazaarResults(uint32 TraderID, uint32 Class_, uint32 Race, uint
|
||||
searchValues.c_str(), searchCriteria.c_str(), RuleI(Bazaar, MaxSearchResults));
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to retrieve Bazaar Search!! %s %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to retrieve Bazaar Search!! %s %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "SRCH: %s", query.c_str());
|
||||
Log.DoLog(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{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find trader: %i\n",atoi(row[1]));
|
||||
Log.DoLog(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]);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price update for %s, Serial No. %i with %i charges",
|
||||
Log.DoLog(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];
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Telling customer to remove item %i with %i charges and S/N %i",
|
||||
Log.DoLog(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;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price updates to customer %s", Customer->GetName());
|
||||
Log.DoLog(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]);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Sending price update for %s, Serial No. %i with %i charges",
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Received Price Update for %s, Item Serial No. %i, New Price %i",
|
||||
Log.DoLog(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.
|
||||
@@ -2081,7 +2081,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
|
||||
TraderCharges_Struct* gis = database.LoadTraderItemWithCharges(CharacterID());
|
||||
|
||||
if(!gis) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Error retrieving Trader items details to update price.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Error retrieving Trader items details to update price.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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).
|
||||
//
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ItemID is %i, Charges is %i", gis->ItemID[i], gis->Charges[i]);
|
||||
Log.DoLog(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 ;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to find item to update price for. Rechecking trader satchels");
|
||||
Log.DoLog(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)) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Found new Item to Add, ItemID is %i, Charges is %i", newgis->Items[i],
|
||||
Log.DoLog(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) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Item not found in Trader Satchels either.");
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding new item for %s. ItemID %i, SerialNumber %i, Charges %i, Price: %i, Slot %i",
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "The new price is the same as the old one.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "The new price is the same as the old one.");
|
||||
safe_delete(gis);
|
||||
return;
|
||||
}
|
||||
@@ -2270,7 +2270,7 @@ void Client::SendBuyerResults(char* searchString, uint32 searchID) {
|
||||
|
||||
// This method is called when a potential seller in the /barter window searches for matching buyers
|
||||
//
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::SendBuyerResults %s\n", searchString);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::SendBuyerResults %s\n", searchString);
|
||||
|
||||
char* escSearchString = new char[strlen(searchString) * 2 + 1];
|
||||
database.DoEscapeString(escSearchString, searchString, strlen(searchString));
|
||||
@@ -2280,7 +2280,7 @@ void Client::SendBuyerResults(char* searchString, uint32 searchID) {
|
||||
safe_delete_array(escSearchString);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to retrieve Barter Search!! %s %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to retrieve Barter Search!! %s %s\n", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2515,7 +2515,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
Quantity = i;
|
||||
break;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Message(13, "Internal error while processing transaction.");
|
||||
return;
|
||||
}
|
||||
@@ -2523,7 +2523,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
ItemInst* ItemToTransfer = m_inv.PopItem(SellerSlot);
|
||||
|
||||
if(!ItemToTransfer || !Buyer->MoveItemToInventory(ItemToTransfer, true)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Message(13, "Internal error while processing transaction.");
|
||||
|
||||
if(ItemToTransfer)
|
||||
@@ -2561,7 +2561,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
int16 SellerSlot = m_inv.HasItem(ItemID, 1, invWhereWorn|invWherePersonal|invWhereCursor);
|
||||
|
||||
if (SellerSlot == INVALID_INDEX) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Message(13, "Internal error while processing transaction.");
|
||||
return;
|
||||
}
|
||||
@@ -2569,7 +2569,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
ItemInst* ItemToTransfer = m_inv.PopItem(SellerSlot);
|
||||
|
||||
if(!ItemToTransfer) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Message(13, "Internal error while processing transaction.");
|
||||
return;
|
||||
}
|
||||
@@ -2581,7 +2581,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
QuantityMoved += ItemToTransfer->GetCharges();
|
||||
|
||||
if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Message(13, "Internal error while processing transaction.");
|
||||
safe_delete(ItemToTransfer);
|
||||
return;
|
||||
@@ -2616,7 +2616,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
ItemToTransfer->SetCharges(QuantityToRemoveFromStack);
|
||||
|
||||
if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
|
||||
Message(13, "Internal error while processing transaction.");
|
||||
safe_delete(ItemToTransfer);
|
||||
return;
|
||||
@@ -2855,11 +2855,11 @@ void Client::UpdateBuyLine(const EQApplicationPacket *app) {
|
||||
|
||||
bool LoreConflict = CheckLoreConflict(item);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "UpdateBuyLine: Char: %s BuySlot: %i ItemID %i %s Quantity %i Toggle: %i Price %i ItemCount %i LoreConflict %i",
|
||||
Log.DoLog(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)) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding to database");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Adding to database");
|
||||
database.AddBuyLine(CharacterID(), BuySlot, ItemID, ItemName, Quantity, Price);
|
||||
QueuePacket(app);
|
||||
}
|
||||
|
||||
+1
-1
@@ -270,7 +270,7 @@ bool ZoneDatabase::LoadTraps(const char* zonename, int16 version) {
|
||||
"FROM traps WHERE zone='%s' AND version=%u", zonename, version);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTraps query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTraps query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -220,7 +220,7 @@ void Client::ChangeTributeSettings(TributeInfo_Struct *t) {
|
||||
|
||||
void Client::SendTributeDetails(uint32 client_id, uint32 tribute_id) {
|
||||
if(tribute_list.count(tribute_id) != 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Details request for invalid tribute %lu", (unsigned long)tribute_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Details request for invalid tribute %lu", (unsigned long)tribute_id);
|
||||
return;
|
||||
}
|
||||
TributeData &td = tribute_list[tribute_id];
|
||||
@@ -390,7 +390,7 @@ bool ZoneDatabase::LoadTributes() {
|
||||
const std::string query = "SELECT id, name, descr, unknown, isguild FROM tributes";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes first query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes first query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ bool ZoneDatabase::LoadTributes() {
|
||||
const std::string query2 = "SELECT tribute_id, level, cost, item_id FROM tribute_levels ORDER BY tribute_id, level";
|
||||
results = QueryDatabase(query2);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes level query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes level query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -415,14 +415,14 @@ bool ZoneDatabase::LoadTributes() {
|
||||
uint32 id = atoul(row[0]);
|
||||
|
||||
if(tribute_list.count(id) != 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes: unknown tribute %lu in tribute_levels", (unsigned long)id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes: unknown tribute %lu in tribute_levels", (unsigned long)id);
|
||||
continue;
|
||||
}
|
||||
|
||||
TributeData &cur = tribute_list[id];
|
||||
|
||||
if(cur.tier_count >= MAX_TRIBUTE_TIERS) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes: on tribute %lu: more tiers defined than permitted", (unsigned long)id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes: on tribute %lu: more tiers defined than permitted", (unsigned long)id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+54
-54
@@ -88,7 +88,7 @@ void NPC::StopWandering()
|
||||
roamer=false;
|
||||
CastToNPC()->SetGrid(0);
|
||||
SendPosition();
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Stop Wandering requested.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Stop Wandering requested.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,16 +107,16 @@ void NPC::ResumeWandering()
|
||||
cur_wp=save_wp;
|
||||
UpdateWaypoint(cur_wp); // have him head to last destination from here
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Resume Wandering requested. Grid %d, wp %d", GetGrid(), cur_wp);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Resume Wandering requested. Grid %d, wp %d", GetGrid(), cur_wp);
|
||||
}
|
||||
else if (AIwalking_timer->Enabled())
|
||||
{ // we are at a waypoint paused normally
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Resume Wandering on timed pause. Grid %d, wp %d", GetGrid(), cur_wp);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Resume Wandering on timed pause. Grid %d, wp %d", GetGrid(), cur_wp);
|
||||
AIwalking_timer->Trigger(); // disable timer to end pause now
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not paused - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not paused - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void NPC::ResumeWandering()
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not on grid - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not on grid - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void NPC::PauseWandering(int pausetime)
|
||||
if (GetGrid() != 0)
|
||||
{
|
||||
DistractedFromGrid = true;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Paused Wandering requested. Grid %d. Resuming in %d ms (0=not until told)", GetGrid(), pausetime);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Pathing, "Paused Wandering requested. Grid %d. Resuming in %d ms (0=not until told)", GetGrid(), pausetime);
|
||||
SendPosition();
|
||||
if (pausetime<1)
|
||||
{ // negative grid number stops him dead in his tracks until ResumeWandering()
|
||||
@@ -154,7 +154,7 @@ void NPC::PauseWandering(int pausetime)
|
||||
AIwalking_timer->Start(pausetime*1000); // set the timer
|
||||
}
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not on grid - can't pause wandering: %lu", (unsigned long)GetNPCTypeID());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not on grid - can't pause wandering: %lu", (unsigned long)GetNPCTypeID());
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void NPC::MoveTo(float mtx, float mty, float mtz, float mth, bool saveguardspot)
|
||||
if (GetGrid() < 0)
|
||||
{ // currently stopped by a quest command
|
||||
SetGrid( 0 - GetGrid()); // get him moving again
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "MoveTo during quest wandering. Canceling quest wandering and going back to grid %d when MoveTo is done.", GetGrid());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "MoveTo during quest wandering. Canceling quest wandering and going back to grid %d when MoveTo is done.", GetGrid());
|
||||
}
|
||||
AIwalking_timer->Disable(); // disable timer in case he is paused at a wp
|
||||
if (cur_wp>=0)
|
||||
@@ -174,14 +174,14 @@ void NPC::MoveTo(float mtx, float mty, float mtz, float mth, bool saveguardspot)
|
||||
save_wp=cur_wp; // save the current waypoint
|
||||
cur_wp=-1; // flag this move as quest controlled
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "MoveTo (%.3f, %.3f, %.3f), pausing regular grid wandering. Grid %d, save_wp %d", mtx, mty, mtz, -GetGrid(), save_wp);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "MoveTo (%.3f, %.3f, %.3f), pausing regular grid wandering. Grid %d, save_wp %d", mtx, mty, mtz, -GetGrid(), save_wp);
|
||||
}
|
||||
else
|
||||
{ // not on a grid
|
||||
roamer=true;
|
||||
save_wp=0;
|
||||
cur_wp=-2; // flag as quest controlled w/no grid
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "MoveTo (%.3f, %.3f, %.3f) without a grid.", mtx, mty, mtz);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "MoveTo (%.3f, %.3f, %.3f) without a grid.", mtx, mty, mtz);
|
||||
}
|
||||
if (saveguardspot)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ void NPC::MoveTo(float mtx, float mty, float mtz, float mth, bool saveguardspot)
|
||||
if(guard_heading == -1)
|
||||
guard_heading = this->CalculateHeadingToTarget(mtx, mty);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Setting guard position to (%.3f, %.3f, %.3f)", guard_x, guard_y, guard_z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Setting guard position to (%.3f, %.3f, %.3f)", guard_x, guard_y, guard_z);
|
||||
}
|
||||
|
||||
cur_wp_x = mtx;
|
||||
@@ -212,7 +212,7 @@ void NPC::MoveTo(float mtx, float mty, float mtz, float mth, bool saveguardspot)
|
||||
void NPC::UpdateWaypoint(int wp_index)
|
||||
{
|
||||
if(wp_index >= static_cast<int>(Waypoints.size())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Update to waypoint %d failed. Not found.", wp_index);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Update to waypoint %d failed. Not found.", wp_index);
|
||||
return;
|
||||
}
|
||||
std::vector<wplist>::iterator cur;
|
||||
@@ -224,7 +224,7 @@ void NPC::UpdateWaypoint(int wp_index)
|
||||
cur_wp_z = cur->z;
|
||||
cur_wp_pause = cur->pause;
|
||||
cur_wp_heading = cur->heading;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next waypoint %d: (%.3f, %.3f, %.3f, %.3f)", wp_index, cur_wp_x, cur_wp_y, cur_wp_z, cur_wp_heading);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next waypoint %d: (%.3f, %.3f, %.3f, %.3f)", wp_index, cur_wp_x, cur_wp_y, cur_wp_z, cur_wp_heading);
|
||||
|
||||
//fix up pathing Z
|
||||
if(zone->HasMap() && RuleB(Map, FixPathingZAtWaypoints))
|
||||
@@ -430,7 +430,7 @@ void NPC::SetWaypointPause()
|
||||
|
||||
void NPC::SaveGuardSpot(bool iClearGuardSpot) {
|
||||
if (iClearGuardSpot) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Clearing guard order.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Clearing guard order.");
|
||||
guard_x = 0;
|
||||
guard_y = 0;
|
||||
guard_z = 0;
|
||||
@@ -443,14 +443,14 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) {
|
||||
guard_heading = heading;
|
||||
if(guard_heading == 0)
|
||||
guard_heading = 0.0001; //hack to make IsGuarding simpler
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Setting guard position to (%.3f, %.3f, %.3f)", guard_x, guard_y, guard_z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Setting guard position to (%.3f, %.3f, %.3f)", guard_x, guard_y, guard_z);
|
||||
}
|
||||
}
|
||||
|
||||
void NPC::NextGuardPosition() {
|
||||
if (!CalculateNewPosition2(guard_x, guard_y, guard_z, GetMovespeed())) {
|
||||
SetHeading(guard_heading);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Unable to move to next guard position. Probably rooted.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Unable to move to next guard position. Probably rooted.");
|
||||
}
|
||||
else if((x_pos == guard_x) && (y_pos == guard_y) && (z_pos == guard_z))
|
||||
{
|
||||
@@ -516,15 +516,15 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
if ((x_pos-x == 0) && (y_pos-y == 0)) {//spawn is at target coords
|
||||
if(z_pos-z != 0) {
|
||||
z_pos = z;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calc Position2 (%.3f, %.3f, %.3f): Jumping pure Z.", x, y, z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calc Position2 (%.3f, %.3f, %.3f): Jumping pure Z.", x, y, z);
|
||||
return true;
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calc Position2 (%.3f, %.3f, %.3f) inWater=%d: We are there.", x, y, z, inWater);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calc Position2 (%.3f, %.3f, %.3f) inWater=%d: We are there.", x, y, z, inWater);
|
||||
return false;
|
||||
}
|
||||
else if ((ABS(x_pos - x) < 0.1) && (ABS(y_pos - y) < 0.1))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calc Position2 (%.3f, %.3f, %.3f): X/Y difference <0.1, Jumping to target.", x, y, z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calc Position2 (%.3f, %.3f, %.3f): X/Y difference <0.1, Jumping to target.", x, y, z);
|
||||
|
||||
if(IsNPC()) {
|
||||
entity_list.ProcessMove(CastToNPC(), x, y, z);
|
||||
@@ -550,7 +550,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
y_pos = new_y;
|
||||
z_pos = new_z;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calculating new position2 to (%.3f, %.3f, %.3f), old vector (%.3f, %.3f, %.3f)", x, y, z, tar_vx, tar_vy, tar_vz);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calculating new position2 to (%.3f, %.3f, %.3f), old vector (%.3f, %.3f, %.3f)", x, y, z, tar_vx, tar_vy, tar_vz);
|
||||
|
||||
uint8 NPCFlyMode = 0;
|
||||
|
||||
@@ -569,7 +569,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr) + 2.0f;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
if( (newz > -2000) && ABS(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaMoving)) // Sanity check.
|
||||
{
|
||||
@@ -612,7 +612,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
//pRunAnimSpeed = (int8)(speed*NPC_RUNANIM_RATIO);
|
||||
//speed *= NPC_SPEED_MULTIPLIER;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calculating new position2 to (%.3f, %.3f, %.3f), new vector (%.3f, %.3f, %.3f) rate %.3f, RAS %d", x, y, z, tar_vx, tar_vy, tar_vz, speed, pRunAnimSpeed);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calculating new position2 to (%.3f, %.3f, %.3f), new vector (%.3f, %.3f, %.3f) rate %.3f, RAS %d", x, y, z, tar_vx, tar_vy, tar_vz, speed, pRunAnimSpeed);
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// 2: get unit vector
|
||||
@@ -647,7 +647,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
z_pos = new_z;
|
||||
tar_ndx=22-numsteps;
|
||||
heading = CalculateHeadingToTarget(x, y);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next position2 (%.3f, %.3f, %.3f) (%d steps)", x_pos, y_pos, z_pos, numsteps);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next position2 (%.3f, %.3f, %.3f) (%d steps)", x_pos, y_pos, z_pos, numsteps);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -659,7 +659,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
y_pos = y;
|
||||
z_pos = z;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Only a single step to get there... jumping.");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Only a single step to get there... jumping.");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -678,7 +678,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
y_pos = new_y;
|
||||
z_pos = new_z;
|
||||
heading = CalculateHeadingToTarget(x, y);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next position2 (%.3f, %.3f, %.3f) (%d steps)", x_pos, y_pos, z_pos, numsteps);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next position2 (%.3f, %.3f, %.3f) (%d steps)", x_pos, y_pos, z_pos, numsteps);
|
||||
}
|
||||
|
||||
uint8 NPCFlyMode = 0;
|
||||
@@ -698,7 +698,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
if( (newz > -2000) && ABS(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaMoving)) // Sanity check.
|
||||
{
|
||||
@@ -759,7 +759,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
moved=false;
|
||||
}
|
||||
SetRunAnimSpeed(0);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Rooted while calculating new position to (%.3f, %.3f, %.3f)", x, y, z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Rooted while calculating new position to (%.3f, %.3f, %.3f)", x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
pRunAnimSpeed = (uint8)(speed*NPC_RUNANIM_RATIO);
|
||||
speed *= NPC_SPEED_MULTIPLIER;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calculating new position to (%.3f, %.3f, %.3f) vector (%.3f, %.3f, %.3f) rate %.3f RAS %d", x, y, z, tar_vx, tar_vy, tar_vz, speed, pRunAnimSpeed);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Calculating new position to (%.3f, %.3f, %.3f) vector (%.3f, %.3f, %.3f) rate %.3f RAS %d", x, y, z, tar_vx, tar_vy, tar_vz, speed, pRunAnimSpeed);
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// 2: get unit vector
|
||||
@@ -790,7 +790,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
x_pos = x;
|
||||
y_pos = y;
|
||||
z_pos = z;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Close enough, jumping to waypoint");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Close enough, jumping to waypoint");
|
||||
}
|
||||
else {
|
||||
float new_x = x_pos + tar_vx*tar_vector;
|
||||
@@ -803,7 +803,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
x_pos = new_x;
|
||||
y_pos = new_y;
|
||||
z_pos = new_z;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next position (%.3f, %.3f, %.3f)", x_pos, y_pos, z_pos);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Next position (%.3f, %.3f, %.3f)", x_pos, y_pos, z_pos);
|
||||
}
|
||||
|
||||
uint8 NPCFlyMode = 0;
|
||||
@@ -823,7 +823,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr) + 2.0f;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
if( (newz > -2000) && ABS(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaMoving)) // Sanity check.
|
||||
{
|
||||
@@ -876,7 +876,7 @@ void NPC::AssignWaypoints(int32 grid) {
|
||||
std::string query = StringFormat("SELECT `type`, `type2` FROM `grid` WHERE `id` = %i AND `zoneid` = %i", grid, zone->GetZoneID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to assign grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to assign grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ void NPC::AssignWaypoints(int32 grid) {
|
||||
"ORDER BY `number`", grid, zone->GetZoneID());
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to assign waypoints from grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to assign waypoints from grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ void Mob::SendTo(float new_x, float new_y, float new_z) {
|
||||
x_pos = new_x;
|
||||
y_pos = new_y;
|
||||
z_pos = new_z;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Sent To (%.3f, %.3f, %.3f)", new_x, new_y, new_z);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Sent To (%.3f, %.3f, %.3f)", new_x, new_y, new_z);
|
||||
|
||||
if(flymode == FlyMode1)
|
||||
return;
|
||||
@@ -967,7 +967,7 @@ void Mob::SendTo(float new_x, float new_y, float new_z) {
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
if( (newz > -2000) && ABS(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaSendTo)) // Sanity check.
|
||||
z_pos = newz + 1;
|
||||
@@ -998,7 +998,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) {
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::AI, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
if( (newz > -2000) && ABS(newz-dest.z) < RuleR(Map, FixPathingZMaxDeltaSendTo)) // Sanity check.
|
||||
z_pos = newz + 1;
|
||||
@@ -1011,7 +1011,7 @@ int ZoneDatabase::GetHighestGrid(uint32 zoneid) {
|
||||
std::string query = StringFormat("SELECT COALESCE(MAX(id), 0) FROM grid WHERE zoneid = %i", zoneid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetHighestGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetHighestGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1028,7 +1028,7 @@ uint8 ZoneDatabase::GetGridType2(uint32 grid, uint16 zoneid) {
|
||||
std::string query = StringFormat("SELECT type2 FROM grid WHERE id = %i AND zoneid = %i", grid, zoneid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetGridType2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetGridType2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1049,7 +1049,7 @@ bool ZoneDatabase::GetWaypoints(uint32 grid, uint16 zoneid, uint32 num, wplist*
|
||||
"WHERE gridid = %i AND number = %i AND zoneid = %i", grid, num, zoneid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetWaypoints query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetWaypoints query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ void ZoneDatabase::AssignGrid(Client *client, float x, float y, uint32 grid)
|
||||
zone->GetShortName(), (int)x, (int)y);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error querying spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error querying spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ void ZoneDatabase::AssignGrid(Client *client, float x, float y, uint32 grid)
|
||||
zone->GetShortName(), x, _GASSIGN_TOLERANCE, y, _GASSIGN_TOLERANCE);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error querying fuzzy spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error querying fuzzy spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1122,7 +1122,7 @@ void ZoneDatabase::AssignGrid(Client *client, float x, float y, uint32 grid)
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1160,7 +1160,7 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type
|
||||
"VALUES (%i, %i, %i, %i)", id, zoneid, type, type2);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error creating grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error creating grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1173,14 +1173,14 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type
|
||||
std::string query = StringFormat("DELETE FROM grid where id=%i", id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
else if(client)
|
||||
client->LogSQL(query.c_str());
|
||||
|
||||
query = StringFormat("DELETE FROM grid_entries WHERE zoneid = %i AND gridid = %i", zoneid, id);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting grid entries '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting grid entries '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
else if(client)
|
||||
client->LogSQL(query.c_str());
|
||||
|
||||
@@ -1196,7 +1196,7 @@ void ZoneDatabase::AddWP(Client *client, uint32 gridid, uint32 wpnum, float xpos
|
||||
gridid, zoneid, wpnum, xpos, ypos, zpos, pause, heading);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1222,7 +1222,7 @@ void ZoneDatabase::DeleteWaypoint(Client *client, uint32 grid_num, uint32 wp_num
|
||||
grid_num, zoneid, wp_num);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1249,7 +1249,7 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos,
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
// Query error
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error setting pathgrid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error setting pathgrid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1270,14 +1270,14 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos,
|
||||
grid_num, zoneid, type1, type2);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
else if(client)
|
||||
client->LogSQL(query.c_str());
|
||||
|
||||
query = StringFormat("UPDATE spawn2 SET pathgrid = '%i' WHERE id = '%i'", grid_num, spawn2id);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating spawn2 pathing '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating spawn2 pathing '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
else if(client)
|
||||
client->LogSQL(query.c_str());
|
||||
}
|
||||
@@ -1289,7 +1289,7 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos,
|
||||
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success()) { // Query error
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting next waypoint id '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting next waypoint id '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1304,7 +1304,7 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos,
|
||||
grid_num, zoneid, next_wp_num, xpos, ypos, zpos, pause, heading);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
|
||||
else if(client)
|
||||
client->LogSQL(query.c_str());
|
||||
|
||||
@@ -1316,7 +1316,7 @@ uint32 ZoneDatabase::GetFreeGrid(uint16 zoneid) {
|
||||
std::string query = StringFormat("SELECT max(id) FROM grid WHERE zoneid = %i", zoneid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetFreeGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetFreeGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1336,7 +1336,7 @@ int ZoneDatabase::GetHighestWaypoint(uint32 zoneid, uint32 gridid) {
|
||||
"WHERE zoneid = %i AND gridid = %i", zoneid, gridid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetHighestWaypoint query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetHighestWaypoint query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -140,7 +140,7 @@ void WorldServer::Process() {
|
||||
|
||||
ServerPacket *pack = 0;
|
||||
while((pack = tcpc.PopPacket())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Got 0x%04x from world:", pack->opcode);
|
||||
Log.DoLog(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;
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World assigned Port: %d for this zone.", sci->port);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World assigned Port: %d for this zone.", sci->port);
|
||||
ZoneConfig::SetZonePort(sci->port);
|
||||
break;
|
||||
}
|
||||
case ServerOP_ZAAuthFailed: {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World server responded 'Not Authorized', disabling reconnect");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "World server responded 'Not Authorized', disabling reconnect");
|
||||
pTryReconnect = false;
|
||||
Disconnect();
|
||||
break;
|
||||
@@ -386,12 +386,12 @@ void WorldServer::Process() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] id=%i, playerineqstring=%i, playersinzonestring=%i. Dumping WhoAllReturnStruct:",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] id=%i, playerineqstring=%i, playersinzonestring=%i. Dumping WhoAllReturnStruct:",
|
||||
wars->id, wars->playerineqstring, wars->playersinzonestring);
|
||||
}
|
||||
}
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "WhoAllReturnStruct: Could not get return struct!");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "WhoAllReturnStruct: Could not get return struct!");
|
||||
break;
|
||||
}
|
||||
case ServerOP_EmoteMessage: {
|
||||
@@ -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);
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzRequest in zone %s for %s, spellid:%i",
|
||||
Log.DoLog(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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzComplete received in zone %s for corpse %s",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "OP_RezzComplete received in zone %s for corpse %s",
|
||||
zone->GetShortName(), srs->rez.corpse_name);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Found corpse. Marking corpse as rezzed.");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Moderate, EQEmuLogSys::Zone_Server, __FUNCTION__ "Received Message SyncWorldTime");
|
||||
Log.DoLog(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));
|
||||
@@ -1381,7 +1381,7 @@ void WorldServer::Process() {
|
||||
if(NewCorpse)
|
||||
NewCorpse->Spawn();
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load player corpse id %u for zone %s.", s->player_corpse_id, zone->GetShortName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load player corpse id %u for zone %s.", s->player_corpse_id, zone->GetShortName());
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "WorldServer::RezzPlayer rezzexp is %i (0 is normal for RezzComplete", rezzexp);
|
||||
Log.DoLog(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)
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Sending player rezz packet to world spellid:%i", sem->rez.spellid);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Sending player rezz packet to world spellid:%i", sem->rez.spellid);
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "NOT Sending player rezz packet to world");
|
||||
Log.DoLog(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;
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Zone received ServerOP_ReloadTasks from World, Command %i", rts->Command);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload ALL tasks");
|
||||
Log.DoLog(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 {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload only task %i", rts->Parameter);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task proximities");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task proximities");
|
||||
taskmanager->LoadProximities(zone->GetZoneID());
|
||||
}
|
||||
break;
|
||||
|
||||
case RELOADTASKGOALLISTS:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task goal lists");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task goal lists");
|
||||
taskmanager->ReloadGoalLists();
|
||||
break;
|
||||
|
||||
case RELOADTASKSETS:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task sets");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Reload task sets");
|
||||
taskmanager->LoadTaskSets();
|
||||
break;
|
||||
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Unhandled ServerOP_ReloadTasks command %i", rts->Command);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[GLOBALLOAD] Unhandled ServerOP_ReloadTasks command %i", rts->Command);
|
||||
|
||||
}
|
||||
|
||||
@@ -2061,7 +2061,7 @@ uint32 WorldServer::NextGroupID() {
|
||||
if(cur_groupid >= last_groupid) {
|
||||
//this is an error... This means that 50 groups were created before
|
||||
//1 packet could make the zone->world->zone trip... so let it error.
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Ran out of group IDs before the server sent us more.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Ran out of group IDs before the server sent us more.");
|
||||
return(0);
|
||||
}
|
||||
if(cur_groupid > (last_groupid - /*50*/995)) {
|
||||
|
||||
+74
-74
@@ -90,7 +90,7 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Booting %s (%d:%d)", zonename, iZoneID, iInstanceID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Booting %s (%d:%d)", zonename, iZoneID, iInstanceID);
|
||||
|
||||
numclients = 0;
|
||||
zone = new Zone(iZoneID, iInstanceID, zonename);
|
||||
@@ -117,13 +117,13 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
log_levels[i]=0; //set to zero on a bogue char
|
||||
}
|
||||
zone->loglevelvar = log_levels[0];
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "General logging level: %i", zone->loglevelvar);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "General logging level: %i", zone->loglevelvar);
|
||||
zone->merchantvar = log_levels[1];
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Merchant logging level: %i", zone->merchantvar);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Merchant logging level: %i", zone->merchantvar);
|
||||
zone->tradevar = log_levels[2];
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Trade logging level: %i", zone->tradevar);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Trade logging level: %i", zone->tradevar);
|
||||
zone->lootvar = log_levels[3];
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loot logging level: %i", zone->lootvar);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loot logging level: %i", zone->lootvar);
|
||||
}
|
||||
else {
|
||||
zone->loglevelvar = uint8(atoi(tmp)); //continue supporting only command logging (for now)
|
||||
@@ -144,8 +144,8 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
delete pack;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "---- Zone server %s, listening on port:%i ----", zonename, ZoneConfig::get()->ZonePort);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Zone Bootup: %s (%i: %i)", zonename, iZoneID, iInstanceID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "---- Zone server %s, listening on port:%i ----", zonename, ZoneConfig::get()->ZonePort);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Zone Bootup: %s (%i: %i)", zonename, iZoneID, iInstanceID);
|
||||
parse->Init();
|
||||
UpdateWindowTitle();
|
||||
zone->GetTimeSync();
|
||||
@@ -167,11 +167,11 @@ bool Zone::LoadZoneObjects() {
|
||||
zoneid, instanceversion);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Objects from DB: %s",results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Objects from DB: %s",results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Objects from DB...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Objects from DB...");
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
if (atoi(row[9]) == 0)
|
||||
{
|
||||
@@ -288,7 +288,7 @@ bool Zone::LoadGroundSpawns() {
|
||||
|
||||
memset(&groundspawn, 0, sizeof(groundspawn));
|
||||
int gsindex=0;
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Ground Spawns from DB...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Ground Spawns from DB...");
|
||||
database.LoadGroundSpawns(zoneid, GetInstanceVersion(), &groundspawn);
|
||||
uint32 ix=0;
|
||||
char* name=0;
|
||||
@@ -402,7 +402,7 @@ uint32 Zone::GetTempMerchantQuantity(uint32 NPCID, uint32 Slot) {
|
||||
}
|
||||
|
||||
void Zone::LoadTempMerchantData() {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Temporary Merchant Lists...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Temporary Merchant Lists...");
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
"DISTINCT ml.npcid, "
|
||||
@@ -420,7 +420,7 @@ void Zone::LoadTempMerchantData() {
|
||||
"ORDER BY ml.slot ", GetShortName(), GetInstanceVersion());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
std::map<uint32, std::list<TempMerchantList> >::iterator cur;
|
||||
@@ -453,7 +453,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) {
|
||||
"classes_required, probability FROM merchantlist WHERE merchantid=%d ORDER BY slot", merchantid);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadNewMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadNewMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) {
|
||||
}
|
||||
|
||||
void Zone::GetMerchantDataForZoneLoad() {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Merchant Lists...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Merchant Lists...");
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
"DISTINCT ml.merchantid, "
|
||||
@@ -497,7 +497,7 @@ void Zone::GetMerchantDataForZoneLoad() {
|
||||
std::map<uint32, std::list<MerchantList> >::iterator cur;
|
||||
uint32 npcid = 0;
|
||||
if (results.RowCount() == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "No Merchant Data found for %s.", GetShortName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "No Merchant Data found for %s.", GetShortName());
|
||||
return;
|
||||
}
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
@@ -547,7 +547,7 @@ void Zone::LoadMercTemplates(){
|
||||
"`merc_stance_entries` ORDER BY `class_id`, `proficiency_id`, `stance_id`";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()");
|
||||
else {
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
MercStanceInfo tempMercStanceInfo;
|
||||
@@ -570,7 +570,7 @@ void Zone::LoadMercTemplates(){
|
||||
"ORDER BY MTyp.race_id, MS.class_id, MTyp.proficiency_id;";
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ void Zone::LoadLevelEXPMods(){
|
||||
const std::string query = "SELECT level, exp_mod, aa_exp_mod FROM level_exp_mods";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadEXPLevelMods()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadEXPLevelMods()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -638,7 +638,7 @@ void Zone::LoadMercSpells(){
|
||||
"ORDER BY msl.class_id, msl.proficiency_id, msle.spell_type, msle.minlevel, msle.slot;";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadMercSpells()");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadMercSpells()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -660,7 +660,7 @@ void Zone::LoadMercSpells(){
|
||||
}
|
||||
|
||||
if(MERC_DEBUG > 0)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Mercenary Debug: Loaded %i merc spells.", merc_spells_list[1].size() + merc_spells_list[2].size() + merc_spells_list[9].size() + merc_spells_list[12].size());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Mercenary Debug: Loaded %i merc spells.", merc_spells_list[1].size() + merc_spells_list[2].size() + merc_spells_list[9].size() + merc_spells_list[12].size());
|
||||
|
||||
}
|
||||
|
||||
@@ -707,11 +707,11 @@ void Zone::Shutdown(bool quite)
|
||||
}
|
||||
zone->ldon_trap_entry_list.clear();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Zone Shutdown: %s (%i)", zone->GetShortName(), zone->GetZoneID());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Zone Shutdown: %s (%i)", zone->GetShortName(), zone->GetZoneID());
|
||||
petition_list.ClearPetitions();
|
||||
zone->GotCurTime(false);
|
||||
if (!quite)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Normal, "Zone shutdown: going to sleep");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Normal, "Zone shutdown: going to sleep");
|
||||
ZoneLoaded = false;
|
||||
|
||||
zone->ResetAuth();
|
||||
@@ -725,19 +725,19 @@ void Zone::Shutdown(bool quite)
|
||||
|
||||
void Zone::LoadZoneDoors(const char* zone, int16 version)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading doors for %s ...", zone);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading doors for %s ...", zone);
|
||||
|
||||
uint32 maxid;
|
||||
int32 count = database.GetDoorsCount(&maxid, zone, version);
|
||||
if(count < 1) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "... No doors loaded.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "... No doors loaded.");
|
||||
return;
|
||||
}
|
||||
|
||||
Door *dlist = new Door[count];
|
||||
|
||||
if(!database.LoadDoors(count, dlist, zone, version)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "... Failed to load doors.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "... Failed to load doors.");
|
||||
delete[] dlist;
|
||||
return;
|
||||
}
|
||||
@@ -801,12 +801,12 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
database.GetZoneLongName(short_name, &long_name, file_name, &psafe_x, &psafe_y, &psafe_z, &pgraveyard_id, &pMaxClients);
|
||||
if(graveyard_id() > 0)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Graveyard ID is %i.", graveyard_id());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Graveyard ID is %i.", graveyard_id());
|
||||
bool GraveYardLoaded = database.GetZoneGraveyard(graveyard_id(), &pgraveyard_zoneid, &pgraveyard_x, &pgraveyard_y, &pgraveyard_z, &pgraveyard_heading);
|
||||
if(GraveYardLoaded)
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Loaded a graveyard for zone %s: graveyard zoneid is %u x is %f y is %f z is %f heading is %f.", short_name, graveyard_zoneid(), graveyard_x(), graveyard_y(), graveyard_z(), graveyard_heading());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Loaded a graveyard for zone %s: graveyard zoneid is %u x is %f y is %f z is %f heading is %f.", short_name, graveyard_zoneid(), graveyard_x(), graveyard_y(), graveyard_z(), graveyard_heading());
|
||||
else
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load the graveyard id %i for zone %s.", graveyard_id(), short_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load the graveyard id %i for zone %s.", graveyard_id(), short_name);
|
||||
}
|
||||
if (long_name == 0) {
|
||||
long_name = strcpy(new char[18], "Long zone missing");
|
||||
@@ -814,7 +814,7 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
autoshutdown_timer.Start(AUTHENTICATION_TIMEOUT * 1000, false);
|
||||
Weather_Timer = new Timer(60000);
|
||||
Weather_Timer->Start();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "The next weather check for zone: %s will be in %i seconds.", short_name, Weather_Timer->GetRemainingTime()/1000);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "The next weather check for zone: %s will be in %i seconds.", short_name, Weather_Timer->GetRemainingTime()/1000);
|
||||
zone_weather = 0;
|
||||
weather_intensity = 0;
|
||||
blocked_spells = nullptr;
|
||||
@@ -899,56 +899,56 @@ Zone::~Zone() {
|
||||
bool Zone::Init(bool iStaticZone) {
|
||||
SetStaticZone(iStaticZone);
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn conditions...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn conditions...");
|
||||
if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn conditions failed, continuing without them.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn conditions failed, continuing without them.");
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading static zone points...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading static zone points...");
|
||||
if (!database.LoadStaticZonePoints(&zone_point_list, short_name, GetInstanceVersion())) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading static zone points failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading static zone points failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn groups...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn groups...");
|
||||
if (!database.LoadSpawnGroups(short_name, GetInstanceVersion(), &spawn_group_list)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn groups failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn groups failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn2 points...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn2 points...");
|
||||
if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion()))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn2 points failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn2 points failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading player corpses...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading player corpses...");
|
||||
if (!database.LoadCharacterCorpses(zoneid, instanceid)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading player corpses failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading player corpses failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading traps...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading traps...");
|
||||
if (!database.LoadTraps(short_name, GetInstanceVersion()))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading traps failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading traps failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading adventure flavor text...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading adventure flavor text...");
|
||||
LoadAdventureFlavor();
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading ground spawns...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading ground spawns...");
|
||||
if (!LoadGroundSpawns())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading ground spawns failed. continuing.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading ground spawns failed. continuing.");
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading World Objects from DB...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading World Objects from DB...");
|
||||
if (!LoadZoneObjects())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading World Objects failed. continuing.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading World Objects failed. continuing.");
|
||||
}
|
||||
|
||||
//load up the zone's doors (prints inside)
|
||||
@@ -1005,10 +1005,10 @@ bool Zone::Init(bool iStaticZone) {
|
||||
}
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading timezone data...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading timezone data...");
|
||||
zone->zone_time.setEQTimeZone(database.GetZoneTZ(zoneid, GetInstanceVersion()));
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Init Finished: ZoneID = %d, Time Offset = %d", zoneid, zone->zone_time.getEQTimeZone());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Init Finished: ZoneID = %d, Time Offset = %d", zoneid, zone->zone_time.getEQTimeZone());
|
||||
|
||||
LoadTickItems();
|
||||
|
||||
@@ -1019,32 +1019,32 @@ bool Zone::Init(bool iStaticZone) {
|
||||
}
|
||||
|
||||
void Zone::ReloadStaticData() {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading Zone Static Data...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading Zone Static Data...");
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading static zone points...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading static zone points...");
|
||||
zone_point_list.Clear();
|
||||
if (!database.LoadStaticZonePoints(&zone_point_list, GetShortName(), GetInstanceVersion())) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading static zone points failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading static zone points failed.");
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading traps...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading traps...");
|
||||
entity_list.RemoveAllTraps();
|
||||
if (!database.LoadTraps(GetShortName(), GetInstanceVersion()))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading traps failed.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading traps failed.");
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading ground spawns...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading ground spawns...");
|
||||
if (!LoadGroundSpawns())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading ground spawns failed. continuing.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading ground spawns failed. continuing.");
|
||||
}
|
||||
|
||||
entity_list.RemoveAllObjects();
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading World Objects from DB...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading World Objects from DB...");
|
||||
if (!LoadZoneObjects())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading World Objects failed. continuing.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading World Objects failed. continuing.");
|
||||
}
|
||||
|
||||
entity_list.RemoveAllDoors();
|
||||
@@ -1060,7 +1060,7 @@ void Zone::ReloadStaticData() {
|
||||
if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion(), true)) // try loading the zone name...
|
||||
LoadZoneCFG(zone->GetFileName(), zone->GetInstanceVersion()); // if that fails, try the file name, then load defaults
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Zone Static Data Reloaded.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Zone Static Data Reloaded.");
|
||||
}
|
||||
|
||||
bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDefault)
|
||||
@@ -1072,7 +1072,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe
|
||||
if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind,
|
||||
can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading the Zone Config.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading the Zone Config.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1087,7 +1087,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe
|
||||
if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind,
|
||||
can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading the Zone Config.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading the Zone Config.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1098,7 +1098,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe
|
||||
strcpy(newzone_data.zone_long_name, GetLongName());
|
||||
strcpy(newzone_data.zone_short_name2, GetShortName());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Successfully loaded Zone Config.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Successfully loaded Zone Config.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1403,11 +1403,11 @@ void Zone::ChangeWeather()
|
||||
weathertimer = weatherTimerRule*1000;
|
||||
Weather_Timer->Start(weathertimer);
|
||||
}
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "The next weather check for zone: %s will be in %i seconds.", zone->GetShortName(), Weather_Timer->GetRemainingTime()/1000);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "The next weather check for zone: %s will be in %i seconds.", zone->GetShortName(), Weather_Timer->GetRemainingTime()/1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "The weather for zone: %s has changed. Old weather was = %i. New weather is = %i The next check will be in %i seconds. Rain chance: %i, Rain duration: %i, Snow chance %i, Snow duration: %i", zone->GetShortName(), tmpOldWeather, zone_weather,Weather_Timer->GetRemainingTime()/1000,rainchance,rainduration,snowchance,snowduration);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "The weather for zone: %s has changed. Old weather was = %i. New weather is = %i The next check will be in %i seconds. Rain chance: %i, Rain duration: %i, Snow chance %i, Snow duration: %i", zone->GetShortName(), tmpOldWeather, zone_weather,Weather_Timer->GetRemainingTime()/1000,rainchance,rainduration,snowchance,snowduration);
|
||||
this->weatherSend();
|
||||
}
|
||||
}
|
||||
@@ -1492,7 +1492,7 @@ void Zone::Repop(uint32 delay) {
|
||||
quest_manager.ClearAllTimers();
|
||||
|
||||
if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion(), delay))
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Error in Zone::Repop: database.PopulateZoneSpawnList failed");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Error in Zone::Repop: database.PopulateZoneSpawnList failed");
|
||||
|
||||
initgrids_timer.Start();
|
||||
|
||||
@@ -1580,8 +1580,8 @@ ZonePoint* Zone::GetClosestZonePoint(float x, float y, float z, uint32 to, Clien
|
||||
{
|
||||
if(client)
|
||||
client->CheatDetected(MQZoneUnknownDest, x, y, z); // Someone is trying to use /zone
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "WARNING: Closest zone point for zone id %d is %f, you might need to update your zone_points table if you dont arrive at the right spot.", to, closest_dist);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "<Real Zone Points>. %f x %f y %f z ", x, y, z);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "WARNING: Closest zone point for zone id %d is %f, you might need to update your zone_points table if you dont arrive at the right spot.", to, closest_dist);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "<Real Zone Points>. %f x %f y %f z ", x, y, z);
|
||||
}
|
||||
|
||||
if(closest_dist > max_distance2)
|
||||
@@ -1861,7 +1861,7 @@ void Zone::LoadBlockedSpells(uint32 zoneid)
|
||||
blocked_spells = new ZoneSpellsBlocked[totalBS];
|
||||
if(!database.LoadBlockedSpells(totalBS, blocked_spells, zoneid))
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "... Failed to load blocked spells.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "... Failed to load blocked spells.");
|
||||
ClearBlockedSpells();
|
||||
}
|
||||
}
|
||||
@@ -1996,7 +1996,7 @@ void Zone::LoadLDoNTraps()
|
||||
const std::string query = "SELECT id, type, spell_id, skill, locked FROM ldon_trap_templates";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadLDoNTraps: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadLDoNTraps: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2017,7 +2017,7 @@ void Zone::LoadLDoNTrapEntries()
|
||||
const std::string query = "SELECT id, trap_id FROM ldon_trap_entries";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadLDoNTrapEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadLDoNTrapEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2059,7 +2059,7 @@ void Zone::LoadVeteranRewards()
|
||||
"ORDER by claim_id, reward_slot";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadVeteranRewards: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadVeteranRewards: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2105,7 +2105,7 @@ void Zone::LoadAlternateCurrencies()
|
||||
const std::string query = "SELECT id, item_id FROM alternate_currency";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadAlternateCurrencies: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadAlternateCurrencies: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2153,7 +2153,7 @@ void Zone::LoadAdventureFlavor()
|
||||
const std::string query = "SELECT id, text FROM adventure_template_entry_flavor";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadAdventureFlavor: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadAdventureFlavor: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2228,7 +2228,7 @@ void Zone::LoadNPCEmotes(LinkedList<NPC_Emote_Struct*>* NPCEmoteList)
|
||||
const std::string query = "SELECT emoteid, event_, type, text FROM npc_emotes";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadNPCEmotes: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadNPCEmotes: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2262,7 +2262,7 @@ void Zone::LoadTickItems()
|
||||
const std::string query = "SELECT it_itemid, it_chance, it_level, it_qglobal, it_bagslot FROM item_tick";
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadTickItems: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadTickItems: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+62
-62
@@ -86,7 +86,7 @@ bool ZoneDatabase::SaveZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
zoneid, instance_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SaveZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SaveZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
"FROM zone WHERE zoneidnumber = %i AND version = %i", zoneid, instance_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
strcpy(*map_filename, "default");
|
||||
return false;
|
||||
}
|
||||
@@ -201,7 +201,7 @@ void ZoneDatabase::UpdateSpawn2Timeleft(uint32 id, uint16 instance_id, uint32 ti
|
||||
"AND instance_id = %lu",(unsigned long)id, (unsigned long)instance_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ void ZoneDatabase::UpdateSpawn2Timeleft(uint32 id, uint16 instance_id, uint32 ti
|
||||
(unsigned long)timeleft, (unsigned long)instance_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ uint32 ZoneDatabase::GetSpawnTimeLeft(uint32 id, uint16 instance_id)
|
||||
(unsigned long)id, (unsigned long)zone->GetInstanceID());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetSpawnTimeLeft query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetSpawnTimeLeft query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ void ZoneDatabase::UpdateSpawn2Status(uint32 id, uint8 new_status)
|
||||
std::string query = StringFormat("UPDATE spawn2 SET enabled = %i WHERE id = %lu", new_status, (unsigned long)id);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateSpawn2Status query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in UpdateSpawn2Status query %s: %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ void ZoneDatabase::GetEventLogs(const char* name,char* target,uint32 account_id,
|
||||
void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container)
|
||||
{
|
||||
if (!container) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Programming error: LoadWorldContainer passed nullptr pointer");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Programming error: LoadWorldContainer passed nullptr pointer");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container)
|
||||
"FROM object_contents WHERE parentid = %i", parentid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DB::LoadWorldContainer: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DB::LoadWorldContainer: %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ void ZoneDatabase::SaveWorldContainer(uint32 zone_id, uint32 parent_id, const It
|
||||
augslot[0], augslot[1], augslot[2], augslot[3], augslot[4], augslot[5]);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::SaveWorldContainer: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::SaveWorldContainer: %s", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ void ZoneDatabase::DeleteWorldContainer(uint32 parent_id, uint32 zone_id)
|
||||
std::string query = StringFormat("DELETE FROM object_contents WHERE parentid = %i AND zoneid = %i", parent_id, zone_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::DeleteWorldContainer: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::DeleteWorldContainer: %s", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Failed to load trader information!\n");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad Slot number when trying to load trader information!\n");
|
||||
Log.DoLog(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()) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Failed to load trader information!\n");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad Slot number when trying to load trader information!\n");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Bad result from query\n"); fflush(stdout);
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item\n");
|
||||
Log.DoLog(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) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item instance\n");
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unable to create item instance\n");
|
||||
fflush(stdout);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -619,25 +619,25 @@ void ZoneDatabase::SaveTraderItem(uint32 CharID, uint32 ItemID, uint32 SerialNum
|
||||
CharID, ItemID, SerialNumber, Charges, ItemCost, Slot);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to save trader item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to save trader item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
void ZoneDatabase::UpdateTraderItemCharges(int CharID, uint32 SerialNumber, int32 Charges) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderItemCharges(%i, %i, %i)", CharID, SerialNumber, Charges);
|
||||
Log.DoLog(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);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update charges for trader item: %i for char_id: %i, the error was: %s\n",
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update charges for trader item: %i for char_id: %i, the error was: %s\n",
|
||||
SerialNumber, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
void ZoneDatabase::UpdateTraderItemPrice(int CharID, uint32 ItemID, uint32 Charges, uint32 NewPrice) {
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderPrice(%i, %i, %i, %i)", CharID, ItemID, Charges, NewPrice);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "ZoneDatabase::UpdateTraderPrice(%i, %i, %i, %i)", CharID, ItemID, Charges, NewPrice);
|
||||
|
||||
const Item_Struct *item = database.GetItem(ItemID);
|
||||
|
||||
@@ -645,12 +645,12 @@ void ZoneDatabase::UpdateTraderItemPrice(int CharID, uint32 ItemID, uint32 Charg
|
||||
return;
|
||||
|
||||
if(NewPrice == 0) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Removing Trader items from the DB for CharID %i, ItemID %i", CharID, ItemID);
|
||||
Log.DoLog(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);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to remove trader item(s): %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to remove trader item(s): %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -661,7 +661,7 @@ void ZoneDatabase::UpdateTraderItemPrice(int CharID, uint32 ItemID, uint32 Charg
|
||||
NewPrice, CharID, ItemID, Charges);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update price for trader item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update price for trader item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -671,7 +671,7 @@ void ZoneDatabase::UpdateTraderItemPrice(int CharID, uint32 ItemID, uint32 Charg
|
||||
NewPrice, CharID, ItemID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update price for trader item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update price for trader item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void ZoneDatabase::DeleteTraderItem(uint32 char_id){
|
||||
@@ -680,7 +680,7 @@ void ZoneDatabase::DeleteTraderItem(uint32 char_id){
|
||||
const std::string query = "DELETE FROM trader";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete all trader items data, the error was: %s\n", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete all trader items data, the error was: %s\n", results.ErrorMessage().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -688,7 +688,7 @@ void ZoneDatabase::DeleteTraderItem(uint32 char_id){
|
||||
std::string query = StringFormat("DELETE FROM trader WHERE char_id = %i", char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete trader item data for char_id: %i, the error was: %s\n", char_id, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete trader item data for char_id: %i, the error was: %s\n", char_id, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
void ZoneDatabase::DeleteTraderItem(uint32 CharID,uint16 SlotID) {
|
||||
@@ -696,7 +696,7 @@ void ZoneDatabase::DeleteTraderItem(uint32 CharID,uint16 SlotID) {
|
||||
std::string query = StringFormat("DELETE FROM trader WHERE char_id = %i And slot_id = %i", CharID, SlotID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete trader item data for char_id: %i, the error was: %s\n",CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete trader item data for char_id: %i, the error was: %s\n",CharID, results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void ZoneDatabase::DeleteBuyLines(uint32 CharID) {
|
||||
@@ -705,7 +705,7 @@ void ZoneDatabase::DeleteBuyLines(uint32 CharID) {
|
||||
const std::string query = "DELETE FROM buyer";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete all buyer items data, the error was: %s\n",results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete all buyer items data, the error was: %s\n",results.ErrorMessage().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -713,7 +713,7 @@ void ZoneDatabase::DeleteBuyLines(uint32 CharID) {
|
||||
std::string query = StringFormat("DELETE FROM buyer WHERE charid = %i", CharID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete buyer item data for charid: %i, the error was: %s\n",CharID,results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete buyer item data for charid: %i, the error was: %s\n",CharID,results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -722,7 +722,7 @@ void ZoneDatabase::AddBuyLine(uint32 CharID, uint32 BuySlot, uint32 ItemID, cons
|
||||
CharID, BuySlot, ItemID, ItemName, Quantity, Price);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to save buline item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to save buline item: %i for char_id: %i, the error was: %s\n", ItemID, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ void ZoneDatabase::RemoveBuyLine(uint32 CharID, uint32 BuySlot) {
|
||||
std::string query = StringFormat("DELETE FROM buyer WHERE charid = %i AND buyslot = %i", CharID, BuySlot);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete buyslot %i for charid: %i, the error was: %s\n", BuySlot, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to delete buyslot %i for charid: %i, the error was: %s\n", BuySlot, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -743,7 +743,7 @@ void ZoneDatabase::UpdateBuyLine(uint32 CharID, uint32 BuySlot, uint32 Quantity)
|
||||
std::string query = StringFormat("UPDATE buyer SET quantity = %i WHERE charid = %i AND buyslot = %i", Quantity, CharID, BuySlot);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update quantity in buyslot %i for charid: %i, the error was: %s\n", BuySlot, CharID, results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Failed to update quantity in buyslot %i for charid: %i, the error was: %s\n", BuySlot, CharID, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -1219,7 +1219,7 @@ bool ZoneDatabase::LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Str
|
||||
|
||||
bool ZoneDatabase::SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value){
|
||||
std::string query = StringFormat("REPLACE INTO `character_languages` (id, lang_id, value) VALUES (%u, %u, %u)", character_id, lang_id, value); QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterLanguage for character ID: %i, lang_id:%u value:%u done", character_id, lang_id, value);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterLanguage for character ID: %i, lang_id:%u value:%u done", character_id, lang_id, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1231,10 +1231,10 @@ bool ZoneDatabase::SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, u
|
||||
/* Save Home Bind Point */
|
||||
std::string query = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
||||
" VALUES (%u, %u, %u, %f, %f, %f, %f, %i)", character_id, zone_id, instance_id, x, y, z, heading, is_home);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterBindPoint for character ID: %i zone_id: %u instance_id: %u x: %f y: %f z: %f heading: %f ishome: %u", character_id, zone_id, instance_id, x, y, z, heading, is_home);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterBindPoint for character ID: %i zone_id: %u instance_id: %u x: %f y: %f z: %f heading: %f ishome: %u", character_id, zone_id, instance_id, x, y, z, heading, is_home);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.RowsAffected()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ERROR Bind Home Save: %s. %s", results.ErrorMessage().c_str(), query.c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ERROR Bind Home Save: %s. %s", results.ErrorMessage().c_str(), query.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1245,20 +1245,20 @@ bool ZoneDatabase::SaveCharacterMaterialColor(uint32 character_id, uint32 slot_i
|
||||
uint8 blue = (color & 0x000000FF);
|
||||
|
||||
std::string query = StringFormat("REPLACE INTO `character_material` (id, slot, red, green, blue, color, use_tint) VALUES (%u, %u, %u, %u, %u, %u, 255)", character_id, slot_id, red, green, blue, color); auto results = QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterMaterialColor for character ID: %i, slot_id: %u color: %u done", character_id, slot_id, color);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterMaterialColor for character ID: %i, slot_id: %u color: %u done", character_id, slot_id, color);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value){
|
||||
std::string query = StringFormat("REPLACE INTO `character_skills` (id, skill_id, value) VALUES (%u, %u, %u)", character_id, skill_id, value); auto results = QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterSkill for character ID: %i, skill_id:%u value:%u done", character_id, skill_id, value);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterSkill for character ID: %i, skill_id:%u value:%u done", character_id, skill_id, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id){
|
||||
std::string query = StringFormat("REPLACE INTO `character_disciplines` (id, slot_id, disc_id) VALUES (%u, %u, %u)", character_id, slot_id, disc_id);
|
||||
auto results = QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterDisc for character ID: %i, slot:%u disc_id:%u done", character_id, slot_id, disc_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterDisc for character ID: %i, slot:%u disc_id:%u done", character_id, slot_id, disc_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1270,7 +1270,7 @@ bool ZoneDatabase::SaveCharacterTribute(uint32 character_id, PlayerProfile_Struc
|
||||
if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != TRIBUTE_NONE){
|
||||
std::string query = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
|
||||
QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterTribute for character ID: %i, tier:%u tribute:%u done", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterTribute for character ID: %i, tier:%u tribute:%u done", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1281,7 +1281,7 @@ bool ZoneDatabase::SaveCharacterBandolier(uint32 character_id, uint8 bandolier_i
|
||||
DoEscapeString(bandolier_name_esc, bandolier_name, strlen(bandolier_name));
|
||||
std::string query = StringFormat("REPLACE INTO `character_bandolier` (id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name) VALUES (%u, %u, %u, %u, %u,'%s')", character_id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name_esc);
|
||||
auto results = QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterBandolier for character ID: %i, bandolier_id: %u, bandolier_slot: %u item_id: %u, icon:%u band_name:%s done", character_id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterBandolier for character ID: %i, bandolier_id: %u, bandolier_slot: %u item_id: %u, icon:%u band_name:%s done", character_id, bandolier_id, bandolier_slot, item_id, icon, bandolier_name);
|
||||
if (!results.RowsAffected()){ std::cout << "ERROR Bandolier Save: " << results.ErrorMessage() << "\n\n" << query << "\n" << std::endl; }
|
||||
return true;
|
||||
}
|
||||
@@ -1596,7 +1596,7 @@ bool ZoneDatabase::SaveCharacterData(uint32 character_id, uint32 account_id, Pla
|
||||
m_epp->expended_aa
|
||||
);
|
||||
auto results = database.QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterData %i, done... Took %f seconds", character_id, ((float)(std::clock() - t)) / CLOCKS_PER_SEC);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "ZoneDatabase::SaveCharacterData %i, done... Took %f seconds", character_id, ((float)(std::clock() - t)) / CLOCKS_PER_SEC);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1637,7 +1637,7 @@ bool ZoneDatabase::SaveCharacterCurrency(uint32 character_id, PlayerProfile_Stru
|
||||
pp->currentEbonCrystals,
|
||||
pp->careerEbonCrystals);
|
||||
auto results = database.QueryDatabase(query);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Saving Currency for character ID: %i, done", character_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Saving Currency for character ID: %i, done", character_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1646,7 +1646,7 @@ bool ZoneDatabase::SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 cur
|
||||
" VALUES (%u, %u, %u)",
|
||||
character_id, aa_id, current_level);
|
||||
auto results = QueryDatabase(rquery);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Saving AA for character ID: %u, aa_id: %u current_level: %u", character_id, aa_id, current_level);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Saving AA for character ID: %u, aa_id: %u current_level: %u", character_id, aa_id, current_level);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2341,7 +2341,7 @@ void ZoneDatabase::SaveMercBuffs(Merc *merc) {
|
||||
std::string query = StringFormat("DELETE FROM merc_buffs WHERE MercId = %u", merc->GetMercID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error While Deleting Merc Buffs before save: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error While Deleting Merc Buffs before save: %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2367,7 +2367,7 @@ void ZoneDatabase::SaveMercBuffs(Merc *merc) {
|
||||
buffs[buffCount].caston_z, buffs[buffCount].ExtraDIChance);
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Saving Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Saving Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2386,7 +2386,7 @@ void ZoneDatabase::LoadMercBuffs(Merc *merc) {
|
||||
merc->GetMercID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2431,7 +2431,7 @@ void ZoneDatabase::LoadMercBuffs(Merc *merc) {
|
||||
query = StringFormat("DELETE FROM merc_buffs WHERE MercId = %u", merc->GetMercID());
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -2447,14 +2447,14 @@ bool ZoneDatabase::DeleteMerc(uint32 merc_id) {
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Deleting Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Deleting Merc Buffs: %s", results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
query = StringFormat("DELETE FROM mercs WHERE MercID = '%u'", merc_id);
|
||||
results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Deleting Merc: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Deleting Merc: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2472,7 +2472,7 @@ void ZoneDatabase::LoadMercEquipment(Merc *merc) {
|
||||
merc->GetLevel(), merc->GetLevel());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Merc Inventory: %s", results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Merc Inventory: %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2646,7 +2646,7 @@ uint8 ZoneDatabase::GroupCount(uint32 groupid) {
|
||||
std::string query = StringFormat("SELECT count(charid) FROM group_id WHERE groupid = %d", groupid);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::GroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::GroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2665,7 +2665,7 @@ uint8 ZoneDatabase::RaidGroupCount(uint32 raidid, uint32 groupid) {
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::RaidGroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::RaidGroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2696,7 +2696,7 @@ int32 ZoneDatabase::GetBlockedSpellsCount(uint32 zoneid)
|
||||
|
||||
bool ZoneDatabase::LoadBlockedSpells(int32 blockedSpellsCount, ZoneSpellsBlocked* into, uint32 zoneid)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Blocked Spells from database...");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading Blocked Spells from database...");
|
||||
|
||||
std::string query = StringFormat("SELECT id, spellid, type, x, y, z, x_diff, y_diff, z_diff, message "
|
||||
"FROM blocked_spells WHERE zoneid = %d ORDER BY id ASC", zoneid);
|
||||
@@ -2825,7 +2825,7 @@ void ZoneDatabase::LoadAltCurrencyValues(uint32 char_id, std::map<uint32, uint32
|
||||
"WHERE char_id = '%u'", char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAltCurrencyValues query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAltCurrencyValues query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2866,7 +2866,7 @@ void ZoneDatabase::SaveBuffs(Client *client) {
|
||||
buffs[index].ExtraDIChance);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SaveBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SaveBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2885,7 +2885,7 @@ void ZoneDatabase::LoadBuffs(Client *client) {
|
||||
"FROM `character_buffs` WHERE `character_id` = '%u'", client->CharacterID());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3059,7 +3059,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
||||
"WHERE `char_id` = %u", client->CharacterID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3087,7 +3087,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
||||
"WHERE `char_id` = %u", client->CharacterID());
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3128,7 +3128,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
||||
"WHERE `char_id`=%u",client->CharacterID());
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3860,7 +3860,7 @@ Corpse* ZoneDatabase::SummonBuriedCharacterCorpses(uint32 char_id, uint32 dest_z
|
||||
NewCorpse->SetDecayTimer(RuleI(Character, CorpseDecayTimeMS));
|
||||
NewCorpse->Spawn();
|
||||
if (!UnburyCharacterCorpse(NewCorpse->GetCorpseDBID(), dest_zone_id, dest_instance_id, dest_x, dest_y, dest_z, dest_heading))
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to unbury a summoned player corpse for character id %u.", char_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to unbury a summoned player corpse for character id %u.", char_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3903,7 +3903,7 @@ bool ZoneDatabase::SummonAllCharacterCorpses(uint32 char_id, uint32 dest_zone_id
|
||||
++CorpseCount;
|
||||
}
|
||||
else{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to construct a player corpse for character id %u.", char_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to construct a player corpse for character id %u.", char_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -44,12 +44,12 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
zoning = true;
|
||||
if (app->size != sizeof(ZoneChange_Struct)) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Wrong size: OP_ZoneChange, size=%d, expected %d", app->size, sizeof(ZoneChange_Struct));
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Wrong size: OP_ZoneChange, size=%d, expected %d", app->size, sizeof(ZoneChange_Struct));
|
||||
return;
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 5
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Zone request from %s", GetName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Zone request from %s", GetName());
|
||||
DumpPacket(app);
|
||||
#endif
|
||||
ZoneChange_Struct* zc=(ZoneChange_Struct*)app->pBuffer;
|
||||
@@ -97,7 +97,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
CheatDetected(MQZone, zc->x, zc->y, zc->z);
|
||||
Message(13, "Invalid unsolicited zone request.");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
//if we didnt get a zone point, or its to a different zone,
|
||||
//then we assume this is invalid.
|
||||
if(!zone_point || zone_point->target_zone_id != target_zone_id) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
|
||||
CheatDetected(MQGate, zc->x, zc->y, zc->z);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
@@ -160,7 +160,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
if(target_zone_name == nullptr) {
|
||||
//invalid zone...
|
||||
Message(13, "Invalid target zone ID.");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
if(!database.GetSafePoints(target_zone_name, database.GetInstanceVersion(target_instance_id), &safe_x, &safe_y, &safe_z, &minstatus, &minlevel, flag_needed)) {
|
||||
//invalid zone...
|
||||
Message(13, "Invalid target zone while getting safe points.");
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
switch(zone_mode) {
|
||||
case EvacToSafeCoords:
|
||||
case ZoneToSafeCoords:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Zoning %s to safe coords (%f,%f,%f) in %s (%d)", GetName(), safe_x, safe_y, safe_z, target_zone_name, target_zone_id);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Zoning %s to safe coords (%f,%f,%f) in %s (%d)", GetName(), safe_x, safe_y, safe_z, target_zone_name, target_zone_id);
|
||||
dest_x = safe_x;
|
||||
dest_y = safe_y;
|
||||
dest_z = safe_z;
|
||||
@@ -253,7 +253,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
|
||||
//could not find a valid reason for them to be zoning, stop it.
|
||||
CheatDetected(MQZoneUnknownDest, 0.0, 0.0, 0.0);
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
|
||||
SendZoneCancel(zc);
|
||||
return;
|
||||
default:
|
||||
@@ -288,7 +288,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
//we have successfully zoned
|
||||
DoZoneSuccess(zc, target_zone_id, target_instance_id, dest_x, dest_y, dest_z, dest_h, ignorerestrictions);
|
||||
} else {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name);
|
||||
SendZoneError(zc, myerror);
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ void Client::SendZoneCancel(ZoneChange_Struct *zc) {
|
||||
|
||||
void Client::SendZoneError(ZoneChange_Struct *zc, int8 err)
|
||||
{
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID);
|
||||
|
||||
SetPortExemption(true);
|
||||
|
||||
@@ -347,7 +347,7 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
if(this->GetPet())
|
||||
entity_list.RemoveFromHateLists(this->GetPet());
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Zoning '%s' to: %s (%i) - (%i) x=%f, y=%f, z=%f", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Status, "Zoning '%s' to: %s (%i) - (%i) x=%f, y=%f, z=%f", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z);
|
||||
|
||||
//set the player's coordinates in the new zone so they have them
|
||||
//when they zone into it
|
||||
@@ -472,7 +472,7 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
|
||||
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
|
||||
break;
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::ProcessMovePC received a reguest to perform an unsupported client zone operation.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::ProcessMovePC received a reguest to perform an unsupported client zone operation.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -534,7 +534,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
heading = m_pp.binds[0].heading;
|
||||
|
||||
zonesummon_ignorerestrictions = 1;
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Player %s has died and will be zoned to bind point in zone: %s at LOC x=%f, y=%f, z=%f, heading=%f", GetName(), pZoneName, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, m_pp.binds[0].heading);
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Player %s has died and will be zoned to bind point in zone: %s at LOC x=%f, y=%f, z=%f, heading=%f", GetName(), pZoneName, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, m_pp.binds[0].heading);
|
||||
break;
|
||||
case SummonPC:
|
||||
zonesummon_x = x_pos = x;
|
||||
@@ -543,14 +543,14 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
SetHeading(heading);
|
||||
break;
|
||||
case Rewind:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "%s has requested a /rewind from %f, %f, %f, to %f, %f, %f in %s", GetName(), x_pos, y_pos, z_pos, rewind_x, rewind_y, rewind_z, zone->GetShortName());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "%s has requested a /rewind from %f, %f, %f, to %f, %f, %f in %s", GetName(), x_pos, y_pos, z_pos, rewind_x, rewind_y, rewind_z, zone->GetShortName());
|
||||
zonesummon_x = x_pos = x;
|
||||
zonesummon_y = y_pos = y;
|
||||
zonesummon_z = z_pos = z;
|
||||
SetHeading(heading);
|
||||
break;
|
||||
default:
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation.");
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation.");
|
||||
ReadyToZone = false;
|
||||
break;
|
||||
}
|
||||
@@ -680,7 +680,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "Player %s has requested a zoning to LOC x=%f, y=%f, z=%f, heading=%f in zoneid=%i", GetName(), x, y, z, heading, zoneID);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "Player %s has requested a zoning to LOC x=%f, y=%f, z=%f, heading=%f in zoneid=%i", GetName(), x, y, z, heading, zoneID);
|
||||
//Clear zonesummon variables if we're zoning to our own zone
|
||||
//Client wont generate a zone change packet to the server in this case so
|
||||
//They aren't needed and it keeps behavior on next zone attempt from being undefined.
|
||||
@@ -768,7 +768,7 @@ void Client::SetZoneFlag(uint32 zone_id) {
|
||||
std::string query = StringFormat("INSERT INTO zone_flags (charID,zoneID) VALUES(%d,%d)", CharacterID(), zone_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
void Client::ClearZoneFlag(uint32 zone_id) {
|
||||
@@ -781,7 +781,7 @@ void Client::ClearZoneFlag(uint32 zone_id) {
|
||||
std::string query = StringFormat("DELETE FROM zone_flags WHERE charID=%d AND zoneID=%d", CharacterID(), zone_id);
|
||||
auto results = database.QueryDatabase(query);
|
||||
if(!results.Success())
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -791,7 +791,7 @@ void Client::LoadZoneFlags() {
|
||||
std::string query = StringFormat("SELECT zoneID from zone_flags WHERE charID=%d", CharacterID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -854,23 +854,23 @@ bool Client::CanBeInZone() {
|
||||
char flag_needed[128];
|
||||
if(!database.GetSafePoints(zone->GetShortName(), zone->GetInstanceVersion(), &safe_x, &safe_y, &safe_z, &minstatus, &minlevel, flag_needed)) {
|
||||
//this should not happen...
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Unable to query zone info for ourself '%s'", zone->GetShortName());
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Unable to query zone info for ourself '%s'", zone->GetShortName());
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(GetLevel() < minlevel) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not meet min level requirement (%d < %d)!", GetLevel(), minlevel);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not meet min level requirement (%d < %d)!", GetLevel(), minlevel);
|
||||
return(false);
|
||||
}
|
||||
if(Admin() < minstatus) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not meet min status requirement (%d < %d)!", Admin(), minstatus);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not meet min status requirement (%d < %d)!", Admin(), minstatus);
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(flag_needed[0] != '\0') {
|
||||
//the flag needed string is not empty, meaning a flag is required.
|
||||
if(Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(zone->GetZoneID())) {
|
||||
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not have the flag to be in this zone (%s)!", flag_needed);
|
||||
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Character does not have the flag to be in this zone (%s)!", flag_needed);
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user