From 8f589dcdd07da0f9eac20402756494ee67b5ecdc Mon Sep 17 00:00:00 2001 From: Subv Date: Fri, 28 Dec 2012 13:53:44 -0500 Subject: [PATCH 1/5] Core/Entities: Add a delta to the ground level difference for removing the flying movementflags when landing. --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5c0435f77b5..a9376dca351 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -17381,7 +17381,7 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel float ground = z; GetMap()->GetWaterOrGroundLevel(x, y, z, &ground); - bool isInAir = G3D::fuzzyGt(z, ground); + bool isInAir = G3D::fuzzyGt(z, ground + 0.05f); CreatureTemplate const* cinfo = creature->GetCreatureTemplate(); if (cinfo->InhabitType & INHABIT_AIR && cinfo->InhabitType & INHABIT_GROUND && isInAir) From 3ad9dafdb683fb7a4cdc98770cbe6fce97aa95ec Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 29 Dec 2012 04:01:46 +0100 Subject: [PATCH 2/5] Core/Entities: Update movement flags for flying/swimming creatures on Creature::Update --- .../game/Entities/Creature/Creature.cpp | 17 +++++++++++++ src/server/game/Entities/Unit/Unit.cpp | 25 ------------------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 00ef3d32a06..650d904db47 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -478,6 +478,23 @@ void Creature::Update(uint32 diff) RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING); } + // Set the movement flags if the creature is in that mode. (Only fly if actually in air, only swim if in water, etc) + float ground = GetPositionZ(); + GetMap()->GetWaterOrGroundLevel(GetPositionX(), GetPositionY(), GetPositionZ(), &ground); + + bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground + 0.05f); + CreatureTemplate const* cinfo = GetCreatureTemplate(); + + if (cinfo->InhabitType & INHABIT_AIR && cinfo->InhabitType & INHABIT_GROUND && isInAir) + SetCanFly(true); + else if (cinfo->InhabitType & INHABIT_AIR && isInAir) + SetDisableGravity(true); + else + { + SetCanFly(false); + SetDisableGravity(false); + } + switch (m_deathState) { case JUST_RESPAWNED: diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a9376dca351..62df8c2049c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -17375,31 +17375,6 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel else if (turn) UpdateOrientation(orientation); - if (Creature* creature = ToCreature()) - { - // Set the movement flags if the creature is in that mode. (Only fly if actually in air, only swim if in water, etc) - float ground = z; - GetMap()->GetWaterOrGroundLevel(x, y, z, &ground); - - bool isInAir = G3D::fuzzyGt(z, ground + 0.05f); - CreatureTemplate const* cinfo = creature->GetCreatureTemplate(); - - if (cinfo->InhabitType & INHABIT_AIR && cinfo->InhabitType & INHABIT_GROUND && isInAir) - SetCanFly(true); - else if (cinfo->InhabitType & INHABIT_AIR && isInAir) - SetDisableGravity(true); - else - { - SetCanFly(false); - SetDisableGravity(false); - } - - if (cinfo->InhabitType & INHABIT_WATER && GetMap()->IsInWater(x, y, z)) - AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING); - else - RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING); - } - // code block for underwater state update UpdateUnderwaterState(GetMap(), x, y, z); From 01997cba4790dc72d8ad557d9c68b9da8dde6719 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 29 Dec 2012 07:57:30 +0100 Subject: [PATCH 3/5] DB/Quest: Citadel footsteps questline. Thx @Exodius This, together with - 007461b6d8112a36b792aef990e05a94c192637d - 90200840968be40da717d256ef4e4eac770e5415 - f1d960a589e1477532aae224ef8a573716ad6d9a solves #7707. Any suggestions/improvements in this issue. --- .../2012_12_28_01_world_citadel_footsteps.sql | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sql/updates/world/2012_12_28_01_world_citadel_footsteps.sql diff --git a/sql/updates/world/2012_12_28_01_world_citadel_footsteps.sql b/sql/updates/world/2012_12_28_01_world_citadel_footsteps.sql new file mode 100644 index 00000000000..3d0ad779dc2 --- /dev/null +++ b/sql/updates/world/2012_12_28_01_world_citadel_footsteps.sql @@ -0,0 +1,77 @@ +-- Do your worst +UPDATE `quest_template` SET `PrevQuestId`=13393 WHERE `Id`=13394; +-- Where dragons fell +UPDATE `quest_template` SET `PrevQuestId`=13397 WHERE `Id`=13398; +-- Argent aid +UPDATE `quest_template` SET `PrevQuestId`=13362 WHERE `Id`=13363; +-- Where dragons fell +UPDATE `quest_template` SET `PrevQuestId`=13349 WHERE `Id`=13359; +-- Time for answers +UPDATE `quest_template` SET `PrevQuestId`=13359 WHERE `Id`=13360; +-- Do your worst +UPDATE `quest_template` SET `PrevQuestId`=13304 WHERE `Id`=13305; +-- A short fuse +UPDATE `quest_template` SET `NextQuestId`=13168 WHERE `Id` IN (13389,13263); +-- Several quest group conditions... +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19,20) AND `SourceEntry` IN (13172,13174); +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES +(19,13172,0,8,13169,'Accepting Seeds of Chaos requires An Undeads Best Friend to be rewarded'), +(19,13172,1,8,13170,'Accepting Seeds of Chaos requires Honor is for the Weak to be rewarded'), +(19,13172,2,8,13171,'Accepting Seeds of Chaos requires From Whence They Came to be rewarded'), +(20,13172,0,8,13169,'Seeing quest mark for Seeds of Chaos requires An Undeads Best Friend to be rewarded'), +(20,13172,1,8,13170,'Seeing quest mark for Seeds of Chaos requires Honor is for the Weak to be rewarded'), +(20,13172,2,8,13171,'Seeing quest mark for Seeds of Chaos requires From Whence They Came to be rewarded'), +(19,13174,0,8,13169,'Accepting Amidst the Confusion requires An Undeads Best Friend to be rewarded'), +(19,13174,1,8,13170,'Accepting Amidst the Confusion requires Honor is for the Weak to be rewarded'), +(19,13174,2,8,13171,'Accepting Amidst the Confusion requires From Whence They Came to be rewarded'), +(20,13174,0,8,13169,'Seeing quest mark for Amidst the Confusion requires An Undeads Best Friend to be rewarded'), +(20,13174,1,8,13170,'Seeing quest mark for Amidst the Confusion requires Honor is for the Weak to be rewarded'), +(20,13174,2,8,13171,'Seeing quest mark for Amidst the Confusion requires From Whence They Came to be rewarded'); +-- Seeds of Chaos / Admist the Confusion +UPDATE `quest_template` SET `NextQuestId`=13155,`ExclusiveGroup`=-13155 WHERE `Id` IN (13172,13174); +-- Generosity Abounds / Matchmaker / Stunning View +UPDATE `quest_template` SET `PrevQuestId`=13145 WHERE `Id` IN (13146,13160,13147); +-- Several quest group conditions... +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19,20) AND `SourceEntry` IN (13161,13163,13162); +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES +(19,13161,0,8,13146,'Accepting The Rider of the Unholy requires Generosity Abounds to be rewarded'), +(19,13161,1,8,13160,'Accepting The Rider of the Unholy requires Stunning View to be rewarded'), +(19,13161,2,8,13147,'Accepting The Rider of the Unholy requires Matchmaker to be rewarded'), +(20,13161,0,8,13146,'Seeing quest mark for The Rider of the Unholy requires Generosity Abounds to be rewarded'), +(20,13161,1,8,13160,'Seeing quest mark for The Rider of the Unholy requires Stunning View to be rewarded'), +(20,13161,2,8,13147,'Seeing quest mark for The Rider of the Unholy requires Matchmaker to be rewarded'), +(19,13163,0,8,13146,'Accepting The Rider of Blood requires Generosity Abounds to be rewarded'), +(19,13163,1,8,13160,'Accepting The Rider of Blood requires Stunning View to be rewarded'), +(19,13163,2,8,13147,'Accepting The Rider of Blood requires Matchmaker to be rewarded'), +(20,13163,0,8,13146,'Seeing quest mark for The Rider of Blood requires Generosity Abounds to be rewarded'), +(20,13163,1,8,13160,'Seeing quest mark for The Rider of Blood requires Stunning View to be rewarded'), +(20,13163,2,8,13147,'Seeing quest mark for The Rider of Blood requires Matchmaker to be rewarded'), +(19,13162,0,8,13146,'Accepting The Rider of Frost requires Generosity Abounds to be rewarded'), +(19,13162,1,8,13160,'Accepting The Rider of Frost requires Stunning View to be rewarded'), +(19,13162,2,8,13147,'Accepting The Rider of Frost requires Matchmaker to be rewarded'), +(20,13162,0,8,13146,'Seeing quest mark for The Rider of Frost requires Generosity Abounds to be rewarded'), +(20,13162,1,8,13160,'Seeing quest mark for The Rider of Frost requires Stunning View to be rewarded'), +(20,13162,2,8,13147,'Seeing quest mark for The Rider of Frost requires Matchmaker to be rewarded'); +-- The Rider of Blood / ... Frost / ... the Unholy +UPDATE `quest_template` SET `NextQuestId`=13164,`ExclusiveGroup`=-13164 WHERE `Id` IN (13161,13163,13162); +-- Where Are They Coming From? +UPDATE `quest_template` SET `PrevQuestId`=13106 WHERE `Id`=13117; +-- Destroying the Altars / Death's Gaze +UPDATE `quest_template` SET `PrevQuestId`=13117,`NextQuestId`=13134,`ExclusiveGroup`=-13134 WHERE `Id` IN (13119,13120); +-- Jagged Shards +UPDATE `quest_template` SET `PrevQuestId`=13134 WHERE `Id`=13136; +-- Several quest group conditions... +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19,20) AND `SourceEntry` IN (13211,13152); +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES +(19,13152,0,8,13140,'Accepting A Visit to the Doctor requires The Runesmiths of Malykriss to be rewarded'), +(19,13152,1,8,13138,'Accepting A Visit to the Doctor requires Im Smelting... Smelting! to be rewarded'), +(20,13152,0,8,13140,'Seeing quest mark for A Visit to the Doctor requires The Runesmiths of Malykriss to be rewarded'), +(20,13152,1,8,13138,'Seeing quest mark for A Visit to the Doctor requires Im Smelting... Smelting! to be rewarded'), +(19,13211,0,8,13140,'Accepting By Fire Be Purged requires The Runesmiths of Malykriss to be rewarded'), +(19,13211,1,8,13138,'Accepting By Fire Be Purged requires Im Smelting... Smelting! to be rewarded'), +(20,13211,0,8,13140,'Seeing quest mark for By Fire Be Purged requires The Runesmiths of Malykriss to be rewarded'), +(20,13211,1,8,13138,'Seeing quest mark for By Fire Be Purged requires Im Smelting... Smelting! to be rewarded'); +-- A Visit to the Doctor / By Fire Be Purged +UPDATE `quest_template` SET `NextQuestId`=13144,`ExclusiveGroup`=-13144 WHERE `Id` IN (13211,13152); +-- Let's Get Out of Here! / Let's Get Out of Here / He's Gone to Pieces +UPDATE `quest_template` SET `PrevQuestId`=13144 WHERE `Id` IN (13481,13482,13212); From 204887774646a2e91b828a01e85efc39830bea15 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 29 Dec 2012 08:03:00 +0100 Subject: [PATCH 4/5] Rename SQL ... forgot again... --- ...el_footsteps.sql => 2012_12_28_04_world_citadel_footsteps.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{2012_12_28_01_world_citadel_footsteps.sql => 2012_12_28_04_world_citadel_footsteps.sql} (100%) diff --git a/sql/updates/world/2012_12_28_01_world_citadel_footsteps.sql b/sql/updates/world/2012_12_28_04_world_citadel_footsteps.sql similarity index 100% rename from sql/updates/world/2012_12_28_01_world_citadel_footsteps.sql rename to sql/updates/world/2012_12_28_04_world_citadel_footsteps.sql From 91f1e53ba2c601d2190d54f2ed058dfef000f22a Mon Sep 17 00:00:00 2001 From: click Date: Sat, 29 Dec 2012 13:35:35 +0100 Subject: [PATCH 5/5] CMake/Buildsystem: Fix a small compiler-problem when using PCH with MSVC - the /Ym flag is adjusted by the compiler in MSVC2012, hence we need to set an upper limit to avoid disrupancies Please note that this is not 'very well tested'. --- cmake/compiler/msvc/settings.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 3d8fe43b6aa..0aa5d93a4b3 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -50,3 +50,7 @@ if(NOT WITH_WARNINGS) message(STATUS "MSVC: Disabled generic compiletime warnings") endif() endif() + +# Specify Precompiled Header Memory Allocation Limit +# (Fix a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012, hence we need to set an upper limit to avoid disrupancies) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm500")