From 762de03be766ebf942ebd40e27df1fae272677f1 Mon Sep 17 00:00:00 2001 From: Noudess Date: Fri, 12 Apr 2019 10:50:11 -0400 Subject: [PATCH 1/5] Merge --- zone/mob_ai.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index fa4ccc3ab..1f79fa5c1 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -447,7 +447,7 @@ void Mob::AI_Init() maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax); pDontHealMeBefore = 0; - pDontBuffMeBefore = 0; + pDontBuffMeBefore = Timer::GetCurrentTime() + 400; pDontDotMeBefore = 0; pDontRootMeBefore = 0; pDontSnareMeBefore = 0; @@ -1636,11 +1636,12 @@ void NPC::AI_DoMovement() { } } - glm::vec3 destination; - destination.x = roambox_destination_x; - destination.y = roambox_destination_y; - destination.z = m_Position.z; - roambox_destination_z = zone->zonemap ? zone->zonemap->FindClosestZ(destination, nullptr) + this->GetZOffset() : 0; + roambox_destination_z = 0; + /* + if (zone->zonemap) { + roambox_destination_z = FindGroundZ(roambox_destination_x, roambox_destination_y, this->GetZOffset()); + } + */ Log(Logs::Detail, Logs::NPCRoamBox, @@ -1799,7 +1800,6 @@ void NPC::AI_SetupNextWaypoint() { else { pause_timer_complete = false; Log(Logs::Detail, Logs::Pathing, "We are departing waypoint %d.", cur_wp); - //if we were under quest control (with no grid), we are done now.. if (cur_wp == EQEmu::WaypointStatus::QuestControlNoGrid) { Log(Logs::Detail, Logs::Pathing, "Non-grid quest mob has reached its quest ordered waypoint. Leaving pathing mode."); From d59170f84f37413f513c3eb175510b84b42389da Mon Sep 17 00:00:00 2001 From: Noudess Date: Fri, 12 Apr 2019 19:09:47 -0400 Subject: [PATCH 2/5] Fix some formatting and fix some incorrect constants. --- zone/mob.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index facb6dc77..b068905a9 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1737,11 +1737,11 @@ void Mob::SendIllusionPacket( new_luclinface = (in_luclinface == 0xFF) ? GetLuclinFace() : in_luclinface; new_beard = (in_beard == 0xFF) ? GetBeard() : in_beard; new_drakkin_heritage = - (in_drakkin_heritage == 0xFF) ? GetDrakkinHeritage() : in_drakkin_heritage; + (in_drakkin_heritage == 0xFFFFFFFF) ? GetDrakkinHeritage() : in_drakkin_heritage; new_drakkin_tattoo = - (in_drakkin_tattoo == 0xFF) ? GetDrakkinTattoo() : in_drakkin_tattoo; + (in_drakkin_tattoo == 0xFFFFFFFF) ? GetDrakkinTattoo() : in_drakkin_tattoo; new_drakkin_details = - (in_drakkin_details == 0xFF) ? GetDrakkinDetails() : in_drakkin_details; + (in_drakkin_details == 0xFFFFFFFF) ? GetDrakkinDetails() : in_drakkin_details; new_aa_title = in_aa_title; size = (in_size <= 0.0f) ? GetSize() : in_size; @@ -1759,12 +1759,9 @@ void Mob::SendIllusionPacket( new_luclinface = luclinface = CastToClient()->GetBaseFace(); new_beard = beard = CastToClient()->GetBaseBeard(); new_aa_title = aa_title = 0xFF; - new_drakkin_heritage = drakkin_heritage - = CastToClient()->GetBaseHeritage(); - new_drakkin_tattoo = drakkin_tattoo - = CastToClient()->GetBaseTattoo(); - new_drakkin_details = drakkin_details - = CastToClient()->GetBaseDetails(); + new_drakkin_heritage = drakkin_heritage = CastToClient()->GetBaseHeritage(); + new_drakkin_tattoo = drakkin_tattoo = CastToClient()->GetBaseTattoo(); + new_drakkin_details = drakkin_details = CastToClient()->GetBaseDetails(); switch (race) { case OGRE: size = 9; From e1e3d99a79d12cf38976fa66b9d7af63bd7d024c Mon Sep 17 00:00:00 2001 From: Noudess Date: Fri, 12 Apr 2019 20:13:30 -0400 Subject: [PATCH 3/5] Change range of values to accomodate large roamboxes --- zone/pathfinder_nav_mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index d4879f6f7..8ab50d508 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -163,7 +163,7 @@ IPathfinder::IPath PathfinderNavmesh::FindPath(const glm::vec3 &start, const glm static const int max_polys = 256; dtPolyRef start_ref; dtPolyRef end_ref; - glm::vec3 ext(5.0f, 100.0f, 5.0f); + glm::vec3 ext(10.0f, 200.0f, 10.0f); m_impl->query->findNearestPoly(¤t_location[0], &ext[0], &filter, &start_ref, 0); m_impl->query->findNearestPoly(&dest_location[0], &ext[0], &filter, &end_ref, 0); From 6739eea78bbc0f293c8faacbb07c38a2b9b73f75 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 1 May 2019 15:26:16 -0500 Subject: [PATCH 4/5] Change NPC scaling classification order check --- zone/npc_scale_manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index 9e20935e8..dd1b9734d 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -416,14 +416,14 @@ int8 NpcScaleManager::GetNPCScalingType(NPC *&npc) { std::string npc_name = npc->GetName(); - if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos || isupper(npc_name[0])) { - return 1; - } - if (npc->IsRaidTarget()) { return 2; } + if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos || isupper(npc_name[0])) { + return 1; + } + return 0; } From d7abf3f26c12e2aaa7c30266e77121f344f60a18 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 1 May 2019 16:23:24 -0500 Subject: [PATCH 5/5] Change compression level in deflate --- common/net/daybreak_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/net/daybreak_connection.cpp b/common/net/daybreak_connection.cpp index f54260e43..962d3c7e3 100644 --- a/common/net/daybreak_connection.cpp +++ b/common/net/daybreak_connection.cpp @@ -942,7 +942,7 @@ uint32_t Deflate(const uint8_t* in, uint32_t in_len, uint8_t* out, uint32_t out_ zstream.avail_in = in_len; zstream.opaque = Z_NULL; - deflateInit(&zstream, Z_FINISH); + deflateInit(&zstream, Z_BEST_SPEED); zstream.next_out = out; zstream.avail_out = out_len;