Skip to content

Commit

Permalink
Merge 3.3.5 to 3.3.5-1vs1
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions committed Nov 25, 2024
2 parents f5659e5 + 31f5866 commit 3cccadf
Show file tree
Hide file tree
Showing 112 changed files with 269 additions and 390 deletions.
2 changes: 1 addition & 1 deletion revision_data.h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define _SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)"
#define _BUILD_DIRECTORY R"(@BUILDDIR@)"
#define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)"
#define _FULL_DATABASE "TDB_full_world_335.24081_2024_08_17.sql"
#define _FULL_DATABASE "TDB_full_world_335.24111_2024_11_22.sql"
#define VER_COMPANYNAME_STR "TrinityCore Developers"
#define VER_LEGALCOPYRIGHT_STR "(c)2008-@rev_year@ TrinityCore"
#define VER_FILEVERSION 0,0,0
Expand Down
13 changes: 7 additions & 6 deletions sql/base/auth_database.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- MySQL dump 10.13 Distrib 8.0.39, for Linux (x86_64)
-- MySQL dump 10.13 Distrib 8.0.40, for Linux (x86_64)
--
-- Host: localhost Database: auth
-- ------------------------------------------------------
-- Server version 8.0.39-0ubuntu0.22.04.1
-- Server version 8.0.40-0ubuntu0.22.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
Expand Down Expand Up @@ -2528,9 +2528,10 @@ INSERT INTO `updates` VALUES
('2024_01_21_00_auth.sql','B45B95D7B608D6ACF1BCBA656718C7DEED8CFF00','ARCHIVED','2024-01-21 11:38:22',0),
('2024_04_10_00_auth.sql','CE8BD4D6DF6DE85DBF892507B1B18B746FE4A71D','ARCHIVED','2024-04-10 16:07:02',0),
('2024_08_17_00_auth.sql','B6D7D00D5573958EE84321B029D869C52793F924','ARCHIVED','2024-08-17 22:26:12',0),
('2024_08_28_01_auth.sql','BC5D74553AF2D92606F55C1C462D2700FE73BD34','RELEASED','2024-08-28 14:55:05',0),
('2024_08_30_00_auth.sql','BD76942F1C29AAA2450E051E7CA552672B5E331B','RELEASED','2024-08-30 19:24:30',0),
('2024_09_26_00_auth.sql','E37C3997FD7851EA360774AC568912846C448272','RELEASED','2024-09-26 18:27:26',0);
('2024_08_28_01_auth.sql','BC5D74553AF2D92606F55C1C462D2700FE73BD34','ARCHIVED','2024-08-28 14:55:05',0),
('2024_08_30_00_auth.sql','BD76942F1C29AAA2450E051E7CA552672B5E331B','ARCHIVED','2024-08-30 19:24:30',0),
('2024_09_26_00_auth.sql','E37C3997FD7851EA360774AC568912846C448272','ARCHIVED','2024-09-26 18:27:26',0),
('2024_11_22_00_auth.sql','F2C1D1572A3968E9E9D778EF7DC82778DF3EF887','ARCHIVED','2024-11-22 23:18:14',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -2669,4 +2670,4 @@ SET character_set_client = @saved_cs_client;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-08-17 22:26:14
-- Dump completed on 2024-11-22 23:18:17
9 changes: 5 additions & 4 deletions sql/base/characters_database.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- MySQL dump 10.13 Distrib 8.0.39, for Linux (x86_64)
-- MySQL dump 10.13 Distrib 8.0.40, for Linux (x86_64)
--
-- Host: localhost Database: characters
-- ------------------------------------------------------
-- Server version 8.0.39-0ubuntu0.22.04.1
-- Server version 8.0.40-0ubuntu0.22.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
Expand Down Expand Up @@ -2687,7 +2687,8 @@ INSERT INTO `updates` VALUES
('2024_02_05_00_characters.sql','1777CBCA822AD85777DA4A390DF7AAF41AF68EBD','ARCHIVED','2024-02-05 12:17:19',0),
('2024_04_10_00_characters.sql','E0D6E19ACE6759332402FA27C23B0F7745C49742','ARCHIVED','2024-04-10 16:07:02',0),
('2024_08_17_00_characters.sql','08705FBCB8504E8B1009FDAF955F56D734FAD782','ARCHIVED','2024-08-17 22:26:12',0),
('2024_10_03_00_characters.sql','408249A6992999A36EB94089D184972E8E0767A3','RELEASED','2024-10-03 11:10:18',0);
('2024_10_03_00_characters.sql','408249A6992999A36EB94089D184972E8E0767A3','ARCHIVED','2024-10-03 11:10:18',0),
('2024_11_22_00_characters.sql','9EA2A4F88036D1D5F47EE8A6B634D52D0014986E','ARCHIVED','2024-11-22 23:18:14',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

Expand Down Expand Up @@ -2858,4 +2859,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-08-17 22:26:14
-- Dump completed on 2024-11-22 23:18:18
16 changes: 10 additions & 6 deletions sql/base/dev/world_database.sql

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions sql/old/3.3.5a/world/24081_2024_11_22/2024_11_18_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Firemane Flamecaller
UPDATE `creature` SET `position_x`=-4964.78955078125, `position_y`=-3821.1826171875, `position_z`=43.62102127075195312, `orientation`=2.776098012924194335, `wander_distance`=5, `MovementType`=1 WHERE `guid`=30504;
2 changes: 2 additions & 0 deletions sql/old/3.3.5a/world/24081_2024_11_22/2024_11_20_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- they only have one gender and it seems DisplayID_Other_Gender will be dropped in the future
UPDATE `creature_model_info` SET `DisplayID_Other_Gender`=0 WHERE `DisplayID` IN (18566,18567,18568,18569);
2 changes: 2 additions & 0 deletions sql/old/3.3.5a/world/24081_2024_11_22/2024_11_20_01_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Death Knights shoud start with Journeyman Riding (150)
UPDATE `playercreateinfo_skills` SET `rank`=2 WHERE `raceMask`=0 AND `classMask`=32 AND `skill`=762;
2 changes: 2 additions & 0 deletions sql/old/3.3.5a/world/24081_2024_11_22/2024_11_22_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Pit of Saron: Set Tyrannus as vehicle minion
UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry`=36794;
2 changes: 2 additions & 0 deletions sql/updates/auth/3.3.5/2024_11_22_00_auth.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- TDB 335.24111 auth
UPDATE `updates` SET `state`='ARCHIVED';
2 changes: 2 additions & 0 deletions sql/updates/characters/3.3.5/2024_11_22_00_characters.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- TDB 335.24111 characters
UPDATE `updates` SET `state`='ARCHIVED';
3 changes: 3 additions & 0 deletions sql/updates/world/3.3.5/2024_11_22_01_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- TDB 335.24111 world
UPDATE `version` SET `db_version`='TDB 335.24111', `cache_id`=24111 LIMIT 1;
UPDATE `updates` SET `state`='ARCHIVED';
4 changes: 4 additions & 0 deletions sql/updates/world/3.3.5/2024_11_24_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Add Gates of Ironforge graveyard for Ally when dying in Ironforge
DELETE FROM `graveyard_zone` WHERE `ID`=852 AND `GhostZone`=1537;
INSERT INTO `graveyard_zone` (`ID`, `GhostZone`, `Faction`, `Comment`) VALUES
(852, 1537, 469, 'Dun Morogh, Gates of Ironforge - Ironforge');
1 change: 1 addition & 0 deletions src/common/Collision/BoundingIntervalHierarchy.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class TC_COMMON_API BIH
delete[] dat.indices;
}
uint32 primCount() const { return uint32(objects.size()); }
G3D::AABox const& bound() const { return bounds; }

template<typename RayCallback>
void intersectRay(const G3D::Ray &r, RayCallback& intersectCallback, float &maxDist, bool stopAtFirst = false) const
Expand Down
46 changes: 8 additions & 38 deletions src/common/Collision/DynamicTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,6 @@ struct DynamicTreeIntersectionCallback
bool didHit() const { return did_hit;}
};

struct DynamicTreeAreaInfoCallback
{
DynamicTreeAreaInfoCallback(uint32 phaseMask) : _phaseMask(phaseMask) {}

void operator()(G3D::Vector3 const& p, GameObjectModel const& obj)
{
obj.intersectPoint(p, _areaInfo, _phaseMask);
}

VMAP::AreaInfo const& GetAreaInfo() const { return _areaInfo; }

private:
uint32 _phaseMask;
VMAP::AreaInfo _areaInfo;
};

struct DynamicTreeLocationInfoCallback
{
DynamicTreeLocationInfoCallback(uint32 phaseMask) : _phaseMask(phaseMask), _hitModel(nullptr) {}
Expand Down Expand Up @@ -265,24 +249,7 @@ float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist,
return -G3D::finf();
}

bool DynamicMapTree::getAreaInfo(float x, float y, float& z, uint32 phasemask, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const
{
G3D::Vector3 v(x, y, z + 0.5f);
DynamicTreeAreaInfoCallback intersectionCallBack(phasemask);
impl->intersectPoint(v, intersectionCallBack);
if (intersectionCallBack.GetAreaInfo().result)
{
flags = intersectionCallBack.GetAreaInfo().flags;
adtId = intersectionCallBack.GetAreaInfo().adtId;
rootId = intersectionCallBack.GetAreaInfo().rootId;
groupId = intersectionCallBack.GetAreaInfo().groupId;
z = intersectionCallBack.GetAreaInfo().ground_Z;
return true;
}
return false;
}

void DynamicMapTree::getAreaAndLiquidData(float x, float y, float z, uint32 phasemask, uint8 reqLiquidType, VMAP::AreaAndLiquidData& data) const
bool DynamicMapTree::getAreaAndLiquidData(float x, float y, float z, uint32 phasemask, Optional<uint8> reqLiquidType, VMAP::AreaAndLiquidData& data) const
{
G3D::Vector3 v(x, y, z + 0.5f);
DynamicTreeLocationInfoCallback intersectionCallBack(phasemask);
Expand All @@ -292,13 +259,16 @@ void DynamicMapTree::getAreaAndLiquidData(float x, float y, float z, uint32 phas
data.floorZ = intersectionCallBack.GetLocationInfo().ground_Z;
uint32 liquidType = intersectionCallBack.GetLocationInfo().hitModel->GetLiquidType();
float liquidLevel;
if (!reqLiquidType || VMAP::VMapFactory::createOrGetVMapManager()->GetLiquidFlagsPtr(liquidType) & reqLiquidType)
if (!reqLiquidType || VMAP::VMapFactory::createOrGetVMapManager()->GetLiquidFlagsPtr(liquidType) & *reqLiquidType)
if (intersectionCallBack.GetHitModel()->GetLiquidLevel(v, intersectionCallBack.GetLocationInfo(), liquidLevel))
data.liquidInfo.emplace(liquidType, liquidLevel);

data.areaInfo.emplace(0,
data.areaInfo.emplace(intersectionCallBack.GetLocationInfo().hitModel->GetWmoID(),
0,
intersectionCallBack.GetLocationInfo().rootId,
intersectionCallBack.GetLocationInfo().hitModel->GetWmoID(),
intersectionCallBack.GetLocationInfo().hitModel->GetMogpFlags());
intersectionCallBack.GetLocationInfo().hitModel->GetMogpFlags(),
0);
return true;
}
return false;
}
4 changes: 2 additions & 2 deletions src/common/Collision/DynamicTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define _DYNTREE_H

#include "Define.h"
#include "Optional.h"

namespace G3D
{
Expand Down Expand Up @@ -48,8 +49,7 @@ class TC_COMMON_API DynamicMapTree

bool getIntersectionTime(uint32 phasemask, const G3D::Ray& ray,
const G3D::Vector3& endPos, float& maxDist) const;
bool getAreaInfo(float x, float y, float& z, uint32 phasemask, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
void getAreaAndLiquidData(float x, float y, float z, uint32 phasemask, uint8 reqLiquidType, VMAP::AreaAndLiquidData& data) const;
bool getAreaAndLiquidData(float x, float y, float z, uint32 phasemask, Optional<uint8> reqLiquidType, VMAP::AreaAndLiquidData& data) const;

bool getObjectHitPos(uint32 phasemask, const G3D::Vector3& pPos1,
const G3D::Vector3& pPos2, G3D::Vector3& pResultHitPos,
Expand Down
24 changes: 13 additions & 11 deletions src/common/Collision/Management/IVMapManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,21 @@ namespace VMAP
{
struct AreaInfo
{
AreaInfo(int32 _adtId, int32 _rootId, int32 _groupId, uint32 _flags) : adtId(_adtId), rootId(_rootId), groupId(_groupId), mogpFlags(_flags) { }
int32 const adtId;
int32 const rootId;
int32 const groupId;
uint32 const mogpFlags;
AreaInfo() = default;
AreaInfo(int32 _groupId, int32 _adtId, int32 _rootId, uint32 _mogpFlags, uint32 _uniqueId)
: groupId(_groupId), adtId(_adtId), rootId(_rootId), mogpFlags(_mogpFlags), uniqueId(_uniqueId) { }
int32 groupId = 0;
int32 adtId = 0;
int32 rootId = 0;
uint32 mogpFlags = 0;
uint32 uniqueId = 0;
};
struct LiquidInfo
{
LiquidInfo() = default;
LiquidInfo(uint32 _type, float _level) : type(_type), level(_level) { }
uint32 const type;
float const level;
uint32 type = 0;
float level = 0.0f;
};

float floorZ = VMAP_INVALID_HEIGHT;
Expand Down Expand Up @@ -117,14 +121,12 @@ namespace VMAP
bool isMapLoadingEnabled() const { return(iEnableLineOfSightCalc || iEnableHeightCalc ); }

virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const =0;

/**
Query world model area info.
\param z gets adjusted to the ground height for which this are info is valid
*/
virtual bool getAreaInfo(uint32 mapId, float x, float y, float &z, uint32 &flags, int32 &adtId, int32 &rootId, int32 &groupId) const=0;
virtual bool GetLiquidLevel(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const=0;
// get both area + liquid data in a single vmap lookup
virtual void getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const=0;
virtual bool getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const = 0;
};

}
Expand Down
76 changes: 14 additions & 62 deletions src/common/Collision/Management/VMapManager2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,63 +233,8 @@ namespace VMAP
return VMAP_INVALID_HEIGHT_VALUE;
}

bool VMapManager2::getAreaInfo(uint32 mapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const
bool VMapManager2::getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const
{
if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG))
{
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
if (instanceTree != iInstanceMapTrees.end())
{
Vector3 pos = convertPositionToInternalRep(x, y, z);
bool result = instanceTree->second->getAreaInfo(pos, flags, adtId, rootId, groupId);
// z is not touched by convertPositionToInternalRep(), so just copy
z = pos.z;
return result;
}
}

return false;
}

bool VMapManager2::GetLiquidLevel(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const
{
if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
{
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
if (instanceTree != iInstanceMapTrees.end())
{
LocationInfo info;
Vector3 pos = convertPositionToInternalRep(x, y, z);
if (instanceTree->second->GetLocationInfo(pos, info))
{
floor = info.ground_Z;
ASSERT(floor < std::numeric_limits<float>::max());
ASSERT(info.hitModel);
type = info.hitModel->GetLiquidType(); // entry from LiquidType.dbc
mogpFlags = info.hitModel->GetMogpFlags();
if (reqLiquidType && !(GetLiquidFlagsPtr(type) & reqLiquidType))
return false;
ASSERT(info.hitInstance);
if (info.hitInstance->GetLiquidLevel(pos, info, level))
return true;
}
}
}

return false;
}

void VMapManager2::getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const
{
if (IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
{
data.floorZ = z;
int32 adtId, rootId, groupId;
uint32 flags;
if (getAreaInfo(mapId, x, y, data.floorZ, flags, adtId, rootId, groupId))
data.areaInfo.emplace(adtId, rootId, groupId, flags);
return;
}
InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId);
if (instanceTree != iInstanceMapTrees.end())
{
Expand All @@ -300,16 +245,23 @@ namespace VMAP
ASSERT(info.hitModel);
ASSERT(info.hitInstance);
data.floorZ = info.ground_Z;
uint32 liquidType = info.hitModel->GetLiquidType();
float liquidLevel;
if (!reqLiquidType || (GetLiquidFlagsPtr(liquidType) & reqLiquidType))
if (info.hitInstance->GetLiquidLevel(pos, info, liquidLevel))
data.liquidInfo.emplace(liquidType, liquidLevel);
if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LIQUIDSTATUS))
{
uint32 liquidType = info.hitModel->GetLiquidType(); // entry from LiquidType.dbc
float liquidLevel;
if (!reqLiquidType || (GetLiquidFlagsPtr(liquidType) & *reqLiquidType))
if (info.hitInstance->GetLiquidLevel(pos, info, liquidLevel))
data.liquidInfo.emplace(liquidType, liquidLevel);
}

if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG))
data.areaInfo.emplace(info.hitInstance->adtId, info.rootId, info.hitModel->GetWmoID(), info.hitModel->GetMogpFlags());
data.areaInfo.emplace(info.hitModel->GetWmoID(), info.hitInstance->adtId, info.rootId, info.hitModel->GetMogpFlags(), info.hitInstance->ID);

return true;
}
}

return false;
}

WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags/* Only used when creating the model */)
Expand Down
4 changes: 1 addition & 3 deletions src/common/Collision/Management/VMapManager2.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ namespace VMAP

bool processCommand(char* /*command*/) override { return false; } // for debug and extensions

bool getAreaInfo(uint32 mapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const override;
bool GetLiquidLevel(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const override;
void getAreaAndLiquidData(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const override;
bool getAreaAndLiquidData(uint32 mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const override;

WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags = 0);
void releaseModelInstance(const std::string& filename);
Expand Down
Loading

0 comments on commit 3cccadf

Please sign in to comment.