From 6079b34a2a30e350d5b9c17e239aa30ad36b1b23 Mon Sep 17 00:00:00 2001 From: Xackery Date: Mon, 26 Sep 2016 02:09:39 -0700 Subject: [PATCH 01/14] Added Ruleset AA:ShowExpValues. --- common/ruletypes.h | 1 + zone/exp.cpp | 51 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 2731c1a26..bf35d03e8 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -55,6 +55,7 @@ RULE_REAL(Character, AAExpMultiplier, 0.5) RULE_REAL(Character, GroupExpMultiplier, 0.5) RULE_REAL(Character, RaidExpMultiplier, 0.2) RULE_BOOL(Character, UseXPConScaling, true) +RULE_INT(Character, ShowExpValues, 0) //0 - normal, 1 - Show raw experience values, 2 - Show raw experience values AND percent. RULE_INT(Character, LightBlueModifier, 40) RULE_INT(Character, BlueModifier, 90) RULE_INT(Character, WhiteModifier, 100) diff --git a/zone/exp.cpp b/zone/exp.cpp index 63989a4e9..9d2d33a31 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -350,19 +350,50 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) { } if ((set_exp + set_aaxp) > (m_pp.exp+m_pp.expAA)) { - if (isrezzexp) - this->Message_StringID(MT_Experience, REZ_REGAIN); - else{ - if(membercount > 1) - this->Message_StringID(MT_Experience, GAIN_GROUPXP); - else if(IsRaidGrouped()) - Message_StringID(MT_Experience, GAIN_RAIDEXP); - else - this->Message_StringID(MT_Experience, GAIN_XP); + + uint32 exp_gained = set_exp - m_pp.exp; + uint32 aaxp_gained = set_aaxp - m_pp.expAA; + float exp_percent = (float)((float)exp_gained / (float)(GetEXPForLevel(GetLevel() + 1) - GetEXPForLevel(GetLevel())))*(float)100; //EXP needed for level + float aaxp_percent = (float)((float)aaxp_gained / (float)(RuleI(AA, ExpPerPoint)))*(float)100; //AAEXP needed for level + std::string exp_amount_message = ""; + if (RuleI(Character, ShowExpValues) >= 1) { + if (exp_gained > 0 && aaxp_gained > 0) exp_amount_message = StringFormat("%u, %u AA", exp_gained, aaxp_gained); + else if (exp_gained > 0) exp_amount_message = StringFormat("%u", exp_gained); + else exp_amount_message = StringFormat("%u AA", aaxp_gained); + } + + std::string exp_percent_message = ""; + if (RuleI(Character, ShowExpValues) >= 2) { + if (exp_gained > 0 && aaxp_gained > 0) exp_percent_message = StringFormat("(%.3f%%, %.3f%%AA)", exp_percent, aaxp_percent); + else if (exp_gained > 0) exp_percent_message = StringFormat("(%.3f%%)", exp_percent); + else exp_percent_message = StringFormat("(%.3f%%AA)", aaxp_percent); + } + + if (isrezzexp) { + if (RuleI(Character, ShowExpValues) > 0) Message(MT_Experience, "You regain %s experience from resurrection. %s", exp_amount_message.c_str(), exp_percent_message.c_str()); + else Message_StringID(MT_Experience, REZ_REGAIN); + } else { + if (membercount > 1) { + if (RuleI(Character, ShowExpValues) > 0) Message(MT_Experience, "You have gained %s party experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str()); + else Message_StringID(MT_Experience, GAIN_GROUPXP); + } + else if (IsRaidGrouped()) { + if (RuleI(Character, ShowExpValues) > 0) Message(MT_Experience, "You have gained %s raid experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str()); + else Message_StringID(MT_Experience, GAIN_RAIDEXP); + } + else { + if (RuleI(Character, ShowExpValues) > 0) Message(MT_Experience, "You have gained %s experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str()); + else Message_StringID(MT_Experience, GAIN_XP); + } } } else if((set_exp + set_aaxp) < (m_pp.exp+m_pp.expAA)){ //only loss message if you lose exp, no message if you gained/lost nothing. - Message(15, "You have lost experience."); + uint32 exp_lost = m_pp.exp - set_exp; + float exp_percent = (float)((float)exp_lost / (float)(GetEXPForLevel(GetLevel() + 1) - GetEXPForLevel(GetLevel())))*(float)100; + + if (RuleI(Character, ShowExpValues) == 1 && exp_lost > 0) Message(13, "You have lost %i experience.", exp_lost); + else if (RuleI(Character, ShowExpValues) == 2 && exp_lost > 0) Message(13, "You have lost %i experience. (%.3f%%)", exp_lost, exp_percent); + else Message(15, "You have lost experience."); } //check_level represents the level we should be when we have From 19b6a96063ccde0cf62481d85dd48efedebd134b Mon Sep 17 00:00:00 2001 From: Xackery Date: Mon, 26 Sep 2016 02:11:50 -0700 Subject: [PATCH 02/14] Changed lost exp message to all be 15. --- zone/exp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/exp.cpp b/zone/exp.cpp index 9d2d33a31..d6b0b903a 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -391,8 +391,8 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) { uint32 exp_lost = m_pp.exp - set_exp; float exp_percent = (float)((float)exp_lost / (float)(GetEXPForLevel(GetLevel() + 1) - GetEXPForLevel(GetLevel())))*(float)100; - if (RuleI(Character, ShowExpValues) == 1 && exp_lost > 0) Message(13, "You have lost %i experience.", exp_lost); - else if (RuleI(Character, ShowExpValues) == 2 && exp_lost > 0) Message(13, "You have lost %i experience. (%.3f%%)", exp_lost, exp_percent); + if (RuleI(Character, ShowExpValues) == 1 && exp_lost > 0) Message(15, "You have lost %i experience.", exp_lost); + else if (RuleI(Character, ShowExpValues) == 2 && exp_lost > 0) Message(15, "You have lost %i experience. (%.3f%%)", exp_lost, exp_percent); else Message(15, "You have lost experience."); } From 4fa8c89e5cc7471402742e47c5d361167948de26 Mon Sep 17 00:00:00 2001 From: Joshua Packard Date: Wed, 28 Sep 2016 19:24:09 -0700 Subject: [PATCH 03/14] Added Best Z Calculation to Ground Spawn Loc --- zone/object.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zone/object.cpp b/zone/object.cpp index c00f718b3..b28a886f3 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -451,6 +451,21 @@ void Object::RandomSpawn(bool send_packet) { m_data.x = zone->random.Real(m_min_x, m_max_x); m_data.y = zone->random.Real(m_min_y, m_max_y); + + if(m_data.z == BEST_Z_INVALID) { + glm::vec3 me; + me.x = m_data.x; + me.y = m_data.y; + me.z = 0; + glm::vec3 hit; + float best_z = zone->zonemap->FindClosestZ(me, &hit); + if (best_z != BEST_Z_INVALID) { + m_data.z = best_z; + } + } + + Log.Out(Logs::Detail, Logs::Zone_Server, "Object::RandomSpawn(%s): %d (%.2f, %.2f, %.2f)", m_data.object_name, m_inst->GetID(), m_data.x, m_data.y, m_data.z); + respawn_timer.Disable(); if(send_packet) { From 329c9c8d98535b410880389227e8167130fa9930 Mon Sep 17 00:00:00 2001 From: Joshua Packard Date: Wed, 28 Sep 2016 19:26:44 -0700 Subject: [PATCH 04/14] Reordered zone initialization Needed to reorder zone init so that the zonemap is loaded before ground spawns are made, otherwise the best Z won't calculate. --- zone/zone.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index 35b2d52bb..1edf1a268 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -100,9 +100,6 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) { worldserver.SetZoneData(0); return false; } - zone->zonemap = Map::LoadMapFile(zone->map_name); - zone->watermap = WaterMap::LoadWaterMapfile(zone->map_name); - zone->pathing = PathManager::LoadPathFile(zone->map_name); std::string tmp; if (database.GetVariable("loglevel", tmp)) { @@ -877,6 +874,23 @@ Zone::~Zone() { //Modified for timezones. bool Zone::Init(bool iStaticZone) { SetStaticZone(iStaticZone); + + //load the zone config file. + 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 + + if(RuleManager::Instance()->GetActiveRulesetID() != default_ruleset) + { + std::string r_name = RuleManager::Instance()->GetRulesetName(&database, default_ruleset); + if(r_name.size() > 0) + { + RuleManager::Instance()->LoadRules(&database, r_name.c_str()); + } + } + + zone->zonemap = Map::LoadMapFile(zone->map_name); + zone->watermap = WaterMap::LoadWaterMapfile(zone->map_name); + zone->pathing = PathManager::LoadPathFile(zone->map_name); Log.Out(Logs::General, Logs::Status, "Loading spawn conditions..."); if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) { @@ -969,19 +983,6 @@ bool Zone::Init(bool iStaticZone) { petition_list.ClearPetitions(); petition_list.ReadDatabase(); - //load the zone config file. - 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 - - if(RuleManager::Instance()->GetActiveRulesetID() != default_ruleset) - { - std::string r_name = RuleManager::Instance()->GetRulesetName(&database, default_ruleset); - if(r_name.size() > 0) - { - RuleManager::Instance()->LoadRules(&database, r_name.c_str()); - } - } - Log.Out(Logs::General, Logs::Status, "Loading timezone data..."); zone->zone_time.setEQTimeZone(database.GetZoneTZ(zoneid, GetInstanceVersion())); From 379ef7eed314fc887e47b36859dbc69b1c888024 Mon Sep 17 00:00:00 2001 From: Joshua Packard Date: Thu, 29 Sep 2016 16:49:05 -0700 Subject: [PATCH 05/14] Added optional SQL to apply max z updates --- utils/sql/git/optional/2016_09_29_GroundSpawnsMaxZ.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 utils/sql/git/optional/2016_09_29_GroundSpawnsMaxZ.sql diff --git a/utils/sql/git/optional/2016_09_29_GroundSpawnsMaxZ.sql b/utils/sql/git/optional/2016_09_29_GroundSpawnsMaxZ.sql new file mode 100644 index 000000000..1cc98e246 --- /dev/null +++ b/utils/sql/git/optional/2016_09_29_GroundSpawnsMaxZ.sql @@ -0,0 +1 @@ +UPDATE ground_spawns SET max_z = -99999 WHERE max_x != min_x OR max_y != min_y From 7b5ea9e99c461b8243e724906e4bb2d352288a1b Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 9 Oct 2016 10:22:55 -0400 Subject: [PATCH 06/14] Fix rogue merchant usage under sneak. --- changelog.txt | 5 +++++ zone/client_process.cpp | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 73be04468..a0339ee08 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/09/2016 == +Noudess: Rogue usage of merchants while utilizing sneak was limited to +temporary items, as the code that checked faction per item sold did not +take into account that rogue was sneaking. Now sneaking rogues can see full +inventory on merchants (well, unless an item requires a + faction value). == 09/12/2016 == Akkadius: Massive overhaul of the update system and EQEmu Server management utility framework (known as eqemu_update.pl) now known as eqemu_server.pl diff --git a/zone/client_process.cpp b/zone/client_process.cpp index e1a769743..9e7b230d7 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -857,7 +857,17 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) { continue; int32 fac = merch ? merch->GetPrimaryFaction() : 0; - if (fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) + int32 cur_fac_level; + if (fac == 0 || sneaking) + { + cur_fac_level = 0; + } + else + { + cur_fac_level = GetModCharacterFactionLevel(fac); + } + + if (cur_fac_level < ml.faction_required) continue; handychance = zone->random.Int(0, merlist.size() + tmp_merlist.size() - 1); From c263c4ef07d6ae1d73791c12fc272efe59e03561 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 9 Oct 2016 11:12:09 -0400 Subject: [PATCH 07/14] 2nd check for faction not needed - had to either check for sneaking again or remove un-needed 2nd check. --- zone/client_packet.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index fa253664b..6fc45fee0 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -12134,11 +12134,6 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app) continue; } - int32 fac = tmp->GetPrimaryFaction(); - if (fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) { - continue; - } - if (mp->itemslot == ml.slot){ item_id = ml.item; break; From a5b19d0c0df7dff2b4d648f204aeb7f91da05363 Mon Sep 17 00:00:00 2001 From: Joshua Packard Date: Mon, 10 Oct 2016 09:39:55 -0700 Subject: [PATCH 08/14] Added 0.1 to calculated Z so that objects show better above ground --- zone/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/object.cpp b/zone/object.cpp index b28a886f3..ab9637e96 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -460,7 +460,7 @@ void Object::RandomSpawn(bool send_packet) { glm::vec3 hit; float best_z = zone->zonemap->FindClosestZ(me, &hit); if (best_z != BEST_Z_INVALID) { - m_data.z = best_z; + m_data.z = best_z + 0.1f; } } From c90a436db30366b7063331e35e2bc9c5055827d6 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 14 Oct 2016 13:52:01 -0400 Subject: [PATCH 09/14] Clang format ConeDirectional --- zone/spells.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index c818c8e90..52a1e1ab9 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5673,45 +5673,45 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust) float angle_start = spells[spell_id].directional_start + (GetHeading() * 360.0f / 256.0f); float angle_end = spells[spell_id].directional_end + (GetHeading() * 360.0f / 256.0f); - while(angle_start > 360.0f) + while (angle_start > 360.0f) angle_start -= 360.0f; - while(angle_end > 360.0f) + while (angle_end > 360.0f) angle_end -= 360.0f; - std::list targets_in_range; - std::list::iterator iter; + std::list targets_in_range; - entity_list.GetTargetsForConeArea(this, spells[spell_id].min_range, spells[spell_id].aoerange, spells[spell_id].aoerange / 2, targets_in_range); - iter = targets_in_range.begin(); + entity_list.GetTargetsForConeArea(this, spells[spell_id].min_range, spells[spell_id].aoerange, + spells[spell_id].aoerange / 2, targets_in_range); + auto iter = targets_in_range.begin(); - while(iter != targets_in_range.end()){ - - if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient()))){ - ++iter; + while (iter != targets_in_range.end()) { + if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient()))) { + ++iter; continue; } - float heading_to_target = (CalculateHeadingToTarget((*iter)->GetX(), (*iter)->GetY()) * 360.0f / 256.0f); + float heading_to_target = + (CalculateHeadingToTarget((*iter)->GetX(), (*iter)->GetY()) * 360.0f / 256.0f); - while(heading_to_target < 0.0f) + while (heading_to_target < 0.0f) heading_to_target += 360.0f; - while(heading_to_target > 360.0f) + while (heading_to_target > 360.0f) heading_to_target -= 360.0f; - if(angle_start > angle_end){ - if((heading_to_target >= angle_start && heading_to_target <= 360.0f) || (heading_to_target >= 0.0f && heading_to_target <= angle_end)){ - if(CheckLosFN((*iter)) || spells[spell_id].npc_no_los){ + if (angle_start > angle_end) { + if ((heading_to_target >= angle_start && heading_to_target <= 360.0f) || + (heading_to_target >= 0.0f && heading_to_target <= angle_end)) { + if (CheckLosFN((*iter)) || spells[spell_id].npc_no_los) { (*iter)->CalcSpellPowerDistanceMod(spell_id, 0, this); - SpellOnTarget(spell_id,(*iter), false, true, resist_adjust); + SpellOnTarget(spell_id, (*iter), false, true, resist_adjust); maxtarget_count++; } } - } - else{ - if(heading_to_target >= angle_start && heading_to_target <= angle_end){ - if(CheckLosFN((*iter)) || spells[spell_id].npc_no_los) { + } else { + if (heading_to_target >= angle_start && heading_to_target <= angle_end) { + if (CheckLosFN((*iter)) || spells[spell_id].npc_no_los) { (*iter)->CalcSpellPowerDistanceMod(spell_id, 0, this); SpellOnTarget(spell_id, (*iter), false, true, resist_adjust); maxtarget_count++; From 05ed623056633ea52f5c30eec9f14143e6425819 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 14 Oct 2016 13:55:04 -0400 Subject: [PATCH 10/14] Add NPC NPC faction check to ConeDirectional --- zone/spells.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zone/spells.cpp b/zone/spells.cpp index 52a1e1ab9..ccae7922b 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5700,6 +5700,19 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust) while (heading_to_target > 360.0f) heading_to_target -= 360.0f; + if (IsNPC() && (*iter)->IsNPC()) { + auto fac = (*iter)->GetReverseFactionCon(this); + if (beneficial_targets) { + // only affect mobs we would assist. + if (!(fac <= FACTION_AMIABLE)) + continue; + } else { + // affect mobs that are on our hate list, or which have bad faction with us + if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS)) + continue; + } + } + if (angle_start > angle_end) { if ((heading_to_target >= angle_start && heading_to_target <= 360.0f) || (heading_to_target >= 0.0f && heading_to_target <= angle_end)) { From 46cbd147b567ebc960dd96be12bbd5a6d82d1f3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 14 Oct 2016 13:58:20 -0400 Subject: [PATCH 11/14] clang format BeamDirectional --- zone/spells.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index ccae7922b..f744541e0 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5619,11 +5619,11 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust) if (IsBeneficialSpell(spell_id) && IsClient()) beneficial_targets = true; - std::list targets_in_range; - std::list::iterator iter; + std::list targets_in_range; - entity_list.GetTargetsForConeArea(this, spells[spell_id].min_range, spells[spell_id].range, spells[spell_id].range / 2, targets_in_range); - iter = targets_in_range.begin(); + entity_list.GetTargetsForConeArea(this, spells[spell_id].min_range, spells[spell_id].range, + spells[spell_id].range / 2, targets_in_range); + auto iter = targets_in_range.begin(); float dX = 0; float dY = 0; @@ -5632,24 +5632,22 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust) CalcDestFromHeading(GetHeading(), spells[spell_id].range, 5, GetX(), GetY(), dX, dY, dZ); dZ = GetZ(); - //FIND SLOPE: Put it into the form y = mx + b + // FIND SLOPE: Put it into the form y = mx + b float m = (dY - GetY()) / (dX - GetX()); float b = (GetY() * dX - dY * GetX()) / (dX - GetX()); - while(iter != targets_in_range.end()) - { - if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient())) - || (*iter)->BehindMob(this, (*iter)->GetX(),(*iter)->GetY())){ - ++iter; + while (iter != targets_in_range.end()) { + if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient())) || + (*iter)->BehindMob(this, (*iter)->GetX(), (*iter)->GetY())) { + ++iter; continue; } //# shortest distance from line to target point float d = std::abs((*iter)->GetY() - m * (*iter)->GetX() - b) / sqrt(m * m + 1); - if (d <= spells[spell_id].aoerange) - { - if(CheckLosFN((*iter)) || spells[spell_id].npc_no_los) { + if (d <= spells[spell_id].aoerange) { + if (CheckLosFN((*iter)) || spells[spell_id].npc_no_los) { (*iter)->CalcSpellPowerDistanceMod(spell_id, 0, this); SpellOnTarget(spell_id, (*iter), false, true, resist_adjust); maxtarget_count++; From e86fca3affc4e5e97cabfdc3f1a5ef85172206ca Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 14 Oct 2016 13:59:45 -0400 Subject: [PATCH 12/14] Add NPC NPC faction check to BeamDirectional --- zone/spells.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zone/spells.cpp b/zone/spells.cpp index f744541e0..04129b554 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5643,6 +5643,19 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust) continue; } + if (IsNPC() && (*iter)->IsNPC()) { + auto fac = (*iter)->GetReverseFactionCon(this); + if (beneficial_targets) { + // only affect mobs we would assist. + if (!(fac <= FACTION_AMIABLE)) + continue; + } else { + // affect mobs that are on our hate list, or which have bad faction with us + if (!(CheckAggro(*iter) || fac == FACTION_THREATENLY || fac == FACTION_SCOWLS)) + continue; + } + } + //# shortest distance from line to target point float d = std::abs((*iter)->GetY() - m * (*iter)->GetX() - b) / sqrt(m * m + 1); From 8496bf16ff201291928ecb33a3067df783d97d58 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 14 Oct 2016 14:37:25 -0500 Subject: [PATCH 13/14] eqemu_server.pl [skip ci] Make the internet connection check more multi-lingual friendly --- utils/scripts/eqemu_server.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 821736fef..180dda907 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -488,11 +488,11 @@ sub check_internet_connection { $count = "n"; } - if (`ping 8.8.8.8 -$count 1 -w 500`=~/Reply from|1 received/i) { + if (`ping 8.8.8.8 -$count 1 -w 500`=~/TTL|1 received/i) { # print "[Update] We have a connection to the internet, continuing...\n"; return 1; } - elsif (`ping 4.2.2.2 -$count 1 -w 500`=~/Reply from|1 received/i) { + elsif (`ping 4.2.2.2 -$count 1 -w 500`=~/TTL|1 received/i) { # print "[Update] We have a connection to the internet, continuing...\n"; return 1; } @@ -2154,4 +2154,4 @@ sub generate_random_password { map $alphanumeric[rand @alphanumeric], 0..$passwordsize; return $randpassword; -} \ No newline at end of file +} From 56babc18012982e6097f78d91fbedc691c80f9f6 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 15 Oct 2016 14:54:57 -0500 Subject: [PATCH 14/14] Update client_process.cpp --- zone/client_process.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 9e7b230d7..407343419 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -858,14 +858,12 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) { int32 fac = merch ? merch->GetPrimaryFaction() : 0; int32 cur_fac_level; - if (fac == 0 || sneaking) - { + if (fac == 0 || sneaking) { cur_fac_level = 0; - } - else - { + } + else { cur_fac_level = GetModCharacterFactionLevel(fac); - } + } if (cur_fac_level < ml.faction_required) continue;