From 123a7eec084987d543ea6d496736166c46bd6731 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Tue, 11 May 2010 16:59:35 +0400 Subject: [PATCH 01/12] Started 3.3.5 branch. --- src/game/SharedDefines.h | 4 ++-- src/game/UpdateFields.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 2a047d913..3bb2370a4 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2676,9 +2676,9 @@ enum TotemSlot // we need to stick to 1 version or half of the stuff will work for someone // others will not and opposite -// will only support WoW, WoW:TBC and WoW:WotLK 3.3.3 client build 11723... +// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 11993... -#define EXPECTED_MANGOSD_CLIENT_BUILD {11723, 0} +#define EXPECTED_MANGOSD_CLIENT_BUILD {11993, 0} // max supported expansion level in mangosd // NOTE: not set it more that supported by targeted client version with all expansions installed diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index 5c64afb23..80b768ea5 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -19,7 +19,7 @@ #ifndef _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H -// Auto generated for version 3, 3, 3, 11723 +// Auto generated for version 0, 3, 5, 11993 enum EObjectFields { From 2a7cb0d17b3b554cda509cef8ca87c2c78ca6cbe Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Tue, 8 Jun 2010 15:52:06 +0400 Subject: [PATCH 02/12] Updated to latest PTR build. --- src/game/Opcodes.h | 12 ++++++++---- src/game/SharedDefines.h | 4 ++-- src/game/UpdateFields.h | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/game/Opcodes.h b/src/game/Opcodes.h index 2a0d6417a..1aacba866 100644 --- a/src/game/Opcodes.h +++ b/src/game/Opcodes.h @@ -1336,12 +1336,16 @@ enum Opcodes UMSG_UNKNOWN_1299 = 0x513, // not found SMSG_COMBAT_LOG_MULTIPLE = 0x514, // SMSG, multi combatlog SMSG_LFG_OPEN_FROM_GOSSIP = 0x515, // event EVENT_LFG_OPEN_FROM_GOSSIP (opens dungeon finder, probably for outdoor bosses) - SMSG_UNKNOWN_1302 = 0x516, // something with player movement (move event 58?) - CMSG_UNKNOWN_1303 = 0x517, // something with player movement (move event 58?) - SMSG_UNKNOWN_1304 = 0x518, // something with player movement (move event 58?), speed packet + SMSG_UNKNOWN_1302 = 0x516, // something with player movement (move event 58) + CMSG_UNKNOWN_1303 = 0x517, // something with player movement (move event 58) + SMSG_UNKNOWN_1304 = 0x518, // something with player movement (move event 58), speed packet UMSG_UNKNOWN_1305 = 0x519, // not found UMSG_UNKNOWN_1306 = 0x51A, // not found - NUM_MSG_TYPES = 0x51B + CMSG_COMMENTATOR_SKIRMISH_QUEUE_COMMAND = 0x51B, // lua: CommentatorSetSkirmishMatchmakingMode/CommentatorRequestSkirmishQueueData/CommentatorRequestSkirmishMode/CommentatorStartSkirmishMatch + SMSG_UNKNOWN_1308 = 0x51C, // event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST, CGCommentator::QueueNode + SMSG_UNKNOWN_1309 = 0x51D, // event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST + SMSG_UNKNOWN_1310 = 0x51E, // some compressed packet? + NUM_MSG_TYPES = 0x51F }; /// Player state diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 3bb2370a4..ecfc96b1e 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2676,9 +2676,9 @@ enum TotemSlot // we need to stick to 1 version or half of the stuff will work for someone // others will not and opposite -// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 11993... +// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12196... -#define EXPECTED_MANGOSD_CLIENT_BUILD {11993, 0} +#define EXPECTED_MANGOSD_CLIENT_BUILD {12196, 0} // max supported expansion level in mangosd // NOTE: not set it more that supported by targeted client version with all expansions installed diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index 80b768ea5..7a3eaccd3 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -19,7 +19,7 @@ #ifndef _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H -// Auto generated for version 0, 3, 5, 11993 +// Auto generated for version 0, 3, 5, 12196 enum EObjectFields { From 40b00f26fb69e77473a30f7386234d3aea54c9da Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Sun, 13 Jun 2010 15:46:08 +0400 Subject: [PATCH 03/12] Updated to latest PTR build. --- src/game/ItemHandler.cpp | 2 +- src/game/SharedDefines.h | 4 ++-- src/game/UpdateFields.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index 41796a76b..86d2e46de 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -744,7 +744,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) data << uint64(vendorguid); size_t count_pos = data.wpos(); - data << uint8(count); // placeholder + data << uint8(count); // placeholder, client limit 150 items (as of 3.3.3) float discountMod = _player->GetReputationPriceDiscount(pCreature); diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 6a9958d58..4183cb09a 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2672,9 +2672,9 @@ enum TotemSlot // we need to stick to 1 version or half of the stuff will work for someone // others will not and opposite -// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12196... +// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12213... -#define EXPECTED_MANGOSD_CLIENT_BUILD {12196, 0} +#define EXPECTED_MANGOSD_CLIENT_BUILD {12213, 0} // max supported expansion level in mangosd // NOTE: not set it more that supported by targeted client version with all expansions installed diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index 7a3eaccd3..2ddf7dcdb 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -19,7 +19,7 @@ #ifndef _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H -// Auto generated for version 0, 3, 5, 12196 +// Auto generated for version 0, 3, 5, 12213 enum EObjectFields { From a93b7936f58921483f09bc5c3adf84e877fd2f0f Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Wed, 16 Jun 2010 17:01:36 +0400 Subject: [PATCH 04/12] Fix. --- src/game/MiscHandler.cpp | 5 ++--- src/game/SocialMgr.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index bf03a3046..8a1738796 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -270,9 +270,8 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ ) //...is jumping ...is falling GetPlayer()->m_movementInfo.HasMovementFlag(MovementFlags(MOVEFLAG_FALLING | MOVEFLAG_FALLINGFAR))) { - WorldPacket data( SMSG_LOGOUT_RESPONSE, (2+4) ) ; - data << (uint8)0xC; - data << uint32(0); + WorldPacket data( SMSG_LOGOUT_RESPONSE, 5 ); + data << uint32(1); data << uint8(0); SendPacket( &data ); LogoutRequest(0); diff --git a/src/game/SocialMgr.h b/src/game/SocialMgr.h index 222b39962..27fed48f4 100644 --- a/src/game/SocialMgr.h +++ b/src/game/SocialMgr.h @@ -41,7 +41,8 @@ enum SocialFlag { SOCIAL_FLAG_FRIEND = 0x01, SOCIAL_FLAG_IGNORED = 0x02, - SOCIAL_FLAG_MUTED = 0x04 // guessed + SOCIAL_FLAG_MUTED = 0x04, // guessed + SOCIAL_FLAG_RAF = 0x08 // Recruit-A-Friend }; struct FriendInfo @@ -80,13 +81,13 @@ typedef std::map SocialMap; /// Results of friend related commands enum FriendsResult { - FRIEND_DB_ERROR = 0x00, + FRIEND_DB_ERROR = 0x00, // ERR_FRIEND_NOT_FOUND FRIEND_LIST_FULL = 0x01, FRIEND_ONLINE = 0x02, FRIEND_OFFLINE = 0x03, - FRIEND_NOT_FOUND = 0x04, + FRIEND_NOT_FOUND = 0x04, // ERR_FRIEND_NOT_FOUND FRIEND_REMOVED = 0x05, - FRIEND_ADDED_ONLINE = 0x06, + FRIEND_ADDED_ONLINE = 0x06, // ERR_FRIEND_ADDED_S FRIEND_ADDED_OFFLINE = 0x07, FRIEND_ALREADY = 0x08, FRIEND_SELF = 0x09, @@ -104,13 +105,13 @@ enum FriendsResult FRIEND_MUTE_ALREADY = 0x15, FRIEND_MUTE_ADDED = 0x16, FRIEND_MUTE_REMOVED = 0x17, - FRIEND_MUTE_AMBIGUOUS = 0x18, // That name is ambiguous, type more of the player's server name - FRIEND_UNK7 = 0x19, // no message at client + FRIEND_MUTE_AMBIGUOUS = 0x18, // ERR_VOICE_IGNORE_AMBIGUOUS + FRIEND_UNK7 = 0x19, // ERR_MAX_VALUE (nothing is showed) FRIEND_UNKNOWN = 0x1A // Unknown friend response from server }; #define SOCIALMGR_FRIEND_LIMIT 50 -#define SOCIALMGR_IGNORE_LIMIT 25 +#define SOCIALMGR_IGNORE_LIMIT 50 class PlayerSocial { From d92e9029da5f143a14ec7a4725367313c1d4d448 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Mon, 21 Jun 2010 13:52:49 +0400 Subject: [PATCH 05/12] Should work with live 3.3.5 client. --- src/game/UpdateFields.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index 2ddf7dcdb..67047e396 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -19,7 +19,7 @@ #ifndef _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H -// Auto generated for version 0, 3, 5, 12213 +// Auto generated for version 3, 3, 5, 12213 enum EObjectFields { From 635be8f687212e8e1edba11169b7fbcd1dff8c30 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Mon, 28 Jun 2010 21:19:11 +0400 Subject: [PATCH 06/12] 3.3.5 have minimum deposit = 1 silver --- src/game/World.cpp | 2 +- src/mangosd/mangosd.conf.dist.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/World.cpp b/src/game/World.cpp index bf97ab24e..6d0942866 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -485,7 +485,7 @@ void World::LoadConfigSettings(bool reload) setConfigPos(CONFIG_FLOAT_RATE_AUCTION_TIME, "Rate.Auction.Time", 1.0f); setConfig(CONFIG_FLOAT_RATE_AUCTION_DEPOSIT, "Rate.Auction.Deposit", 1.0f); setConfig(CONFIG_FLOAT_RATE_AUCTION_CUT, "Rate.Auction.Cut", 1.0f); - setConfigPos(CONFIG_UINT32_AUCTION_DEPOSIT_MIN, "Auction.Deposit.Min", 0); + setConfigPos(CONFIG_UINT32_AUCTION_DEPOSIT_MIN, "Auction.Deposit.Min", SILVER); setConfig(CONFIG_FLOAT_RATE_HONOR, "Rate.Honor",1.0f); setConfigPos(CONFIG_FLOAT_RATE_MINING_AMOUNT, "Rate.Mining.Amount", 1.0f); setConfigPos(CONFIG_FLOAT_RATE_MINING_NEXT, "Rate.Mining.Next", 1.0f); diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 9d9ffb23d..03ac96811 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1165,7 +1165,7 @@ Visibility.Distance.Grey.Object = 10 # # Auction.Deposit.Min # Mininumum auction deposit size in copper -# Default: 0 +# Default: 100 (1 silver) # # Rate.Honor # Honor gain rate @@ -1278,7 +1278,7 @@ Rate.Damage.Fall = 1 Rate.Auction.Time = 1 Rate.Auction.Deposit = 1 Rate.Auction.Cut = 1 -Auction.Deposit.Min = 0 +Auction.Deposit.Min = 100 Rate.Honor = 1 Rate.Mining.Amount = 1 Rate.Mining.Next = 1 From 41c8032af81e05a53938e395268af41773775da4 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Thu, 24 Jun 2010 19:44:36 +0400 Subject: [PATCH 07/12] Fix. --- src/game/Opcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/Opcodes.h b/src/game/Opcodes.h index 8de6e166c..1aacba866 100644 --- a/src/game/Opcodes.h +++ b/src/game/Opcodes.h @@ -1242,7 +1242,7 @@ enum Opcodes SMSG_ITEM_REFUND_RESULT = 0x4B5, // refund item result CMSG_CORPSE_MAP_POSITION_QUERY = 0x4B6, // CMSG, uint32 SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE = 0x4B7, // SMSG, 3*float+float - CMSG_LFG_SET_ROLES_2 = 0x4B8, // not found + UMSG_UNKNOWN_1208 = 0x4B8, // not found UMSG_UNKNOWN_1209 = 0x4B9, // not found CMSG_CALENDAR_CONTEXT_EVENT_SIGNUP = 0x4BA, // CMSG, uint64, lua: CalendarContextEventSignUp SMSG_CALENDAR_ACTION_PENDING = 0x4BB, // SMSG, calendar related EVENT_CALENDAR_ACTION_PENDING From 2a2258445b8773b63120aaa6cd1c873ad724d7e1 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Tue, 29 Jun 2010 18:19:41 +0400 Subject: [PATCH 08/12] I guess that will do the trick. --- src/game/SharedDefines.h | 4 ++-- src/game/UpdateFields.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 2e0cb1d6c..80ec93280 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2699,9 +2699,9 @@ enum TradeStatus // we need to stick to 1 version or half of the stuff will work for someone // others will not and opposite -// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12213... +// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12340... -#define EXPECTED_MANGOSD_CLIENT_BUILD {12213, 0} +#define EXPECTED_MANGOSD_CLIENT_BUILD {12340, 0} // max supported expansion level in mangosd // NOTE: not set it more that supported by targeted client version with all expansions installed diff --git a/src/game/UpdateFields.h b/src/game/UpdateFields.h index 67047e396..6284dee16 100644 --- a/src/game/UpdateFields.h +++ b/src/game/UpdateFields.h @@ -19,7 +19,7 @@ #ifndef _UPDATEFIELDS_AUTO_H #define _UPDATEFIELDS_AUTO_H -// Auto generated for version 3, 3, 5, 12213 +// Auto generated for version 3, 3, 5, 12340 enum EObjectFields { From 6f23662ed04cee13e78feeb8da53f5f356165b34 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Tue, 29 Jun 2010 20:49:52 +0400 Subject: [PATCH 09/12] Hmm, something was wrong here... --- src/game/WorldSocket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index ee087dd82..684e4a584 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -743,7 +743,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) // NOTE: ATM the socket is singlethread, have this in mind ... uint8 digest[20]; uint32 clientSeed; - uint32 unk2, unk3; + uint32 unk2, unk3, unk5, unk6, unk7; uint64 unk4; uint32 ClientBuild; uint32 id, security; @@ -762,6 +762,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) recvPacket >> account; recvPacket >> unk3; recvPacket >> clientSeed; + recvPacket >> unk5 >> unk6 >> unk7; recvPacket >> unk4; recvPacket.read (digest, 20); From 45ad804752cbda10236225a2b3b41a5ba7780a0d Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Wed, 30 Jun 2010 14:52:40 +0400 Subject: [PATCH 10/12] SpellRange.dbc struct update. --- src/game/DBCStructure.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index e63ae5ca9..74500a0f0 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -1518,11 +1518,14 @@ struct SpellRadiusEntry struct SpellRangeEntry { - uint32 ID; - float minRange; - float minRangeFriendly; - float maxRange; - float maxRangeFriendly; + uint32 ID; // 0 + float minRange; // 1 + float minRangeFriendly; // 2 + float maxRange; // 3 + float maxRangeFriendly; // 4 + //uint32 Flags; // 5 + //char* range1; // 6 + //char* range2; // 7 }; struct SpellRuneCostEntry From 0a01d2bc6e228c1f556c243e41fd5dbdb06752c3 Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Wed, 30 Jun 2010 19:46:31 +0400 Subject: [PATCH 11/12] Creature typeflags research. --- src/game/SharedDefines.h | 53 ++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 80ec93280..9f5d1c7f6 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1913,30 +1913,35 @@ enum CreatureFamily enum CreatureTypeFlags { - CREATURE_TYPEFLAGS_TAMEABLE = 0x000001, // Tameable by any hunter - CREATURE_TYPEFLAGS_GHOST_VISIBLE = 0x000002, // Creatures which can _also_ be seen when player is a ghost - CREATURE_TYPEFLAGS_UNK3 = 0x000004, - CREATURE_TYPEFLAGS_UNK4 = 0x000008, - CREATURE_TYPEFLAGS_UNK5 = 0x000010, - CREATURE_TYPEFLAGS_UNK6 = 0x000020, - CREATURE_TYPEFLAGS_UNK7 = 0x000040, - CREATURE_TYPEFLAGS_UNK8 = 0x000080, - CREATURE_TYPEFLAGS_HERBLOOT = 0x000100, // Can be looted by herbalist - CREATURE_TYPEFLAGS_MININGLOOT = 0x000200, // Can be looted by miner - CREATURE_TYPEFLAGS_UNK11 = 0x000400, - CREATURE_TYPEFLAGS_UNK12 = 0x000800, // ? Related to mounts in some way. If mounted, fight mounted, mount appear as independant when rider dies? - CREATURE_TYPEFLAGS_UNK13 = 0x001000, // ? Can aid any player in combat if in range? - CREATURE_TYPEFLAGS_UNK14 = 0x002000, - CREATURE_TYPEFLAGS_UNK15 = 0x004000, // ? Possibly not in use - CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x008000, // Can be looted by engineer - CREATURE_TYPEFLAGS_EXOTIC = 0x010000, // Can be tamed by hunter as exotic pet - CREATURE_TYPEFLAGS_UNK18 = 0x020000, // ? Related to vehicles/pvp? - CREATURE_TYPEFLAGS_UNK19 = 0x040000, // ? Related to vehicle/siege weapons? - CREATURE_TYPEFLAGS_UNK20 = 0x080000, - CREATURE_TYPEFLAGS_UNK21 = 0x100000, - CREATURE_TYPEFLAGS_UNK22 = 0x200000, - CREATURE_TYPEFLAGS_UNK23 = 0x400000, - CREATURE_TYPEFLAGS_UNK24 = 0x800000 // ? First seen in 3.2.2. Related to banner/backpack of creature/companion? + CREATURE_TYPEFLAGS_TAMEABLE = 0x00000001, // Tameable by any hunter + CREATURE_TYPEFLAGS_GHOST_VISIBLE = 0x00000002, // Creatures which can _also_ be seen when player is a ghost, used in CanInteract function by client, can't be attacked + CREATURE_TYPEFLAGS_UNK3 = 0x00000004, // "BOSS" flag for tooltips + CREATURE_TYPEFLAGS_UNK4 = 0x00000008, + CREATURE_TYPEFLAGS_UNK5 = 0x00000010, // controls something in client tooltip related to creature faction + CREATURE_TYPEFLAGS_UNK6 = 0x00000020, // may be sound related + CREATURE_TYPEFLAGS_UNK7 = 0x00000040, // may be related to attackable / not attackable creatures with spells, used together with lua_IsHelpfulSpell/lua_IsHarmfulSpell + CREATURE_TYPEFLAGS_UNK8 = 0x00000080, // has something to do with unit interaction / quest status requests + CREATURE_TYPEFLAGS_HERBLOOT = 0x00000100, // Can be looted by herbalist + CREATURE_TYPEFLAGS_MININGLOOT = 0x00000200, // Can be looted by miner + CREATURE_TYPEFLAGS_UNK11 = 0x00000400, // no idea, but it used by client + CREATURE_TYPEFLAGS_UNK12 = 0x00000800, // related to possibility to cast spells while mounted + CREATURE_TYPEFLAGS_UNK13 = 0x00001000, // ? Can aid any player in combat if in range? + CREATURE_TYPEFLAGS_UNK14 = 0x00002000, // checked from calls in Lua_PetHasActionBar + CREATURE_TYPEFLAGS_UNK15 = 0x00004000, // Lua_UnitGUID, client does guid_low &= 0xFF000000 if this flag is set + CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x00008000, // Can be looted by engineer + CREATURE_TYPEFLAGS_EXOTIC = 0x00010000, // Can be tamed by hunter as exotic pet + CREATURE_TYPEFLAGS_UNK18 = 0x00020000, // related to CreatureDisplayInfo and scaling in some way + CREATURE_TYPEFLAGS_UNK19 = 0x00040000, // ? Related to vehicle/siege weapons? + CREATURE_TYPEFLAGS_UNK20 = 0x00080000, // may be has something to do with missiles + CREATURE_TYPEFLAGS_UNK21 = 0x00100000, // no idea, but it used by client, may be related to rendering + CREATURE_TYPEFLAGS_UNK22 = 0x00200000, // may be has something to do with animation (disable animation?) + CREATURE_TYPEFLAGS_UNK23 = 0x00400000, // this one probably controls some creature visual + CREATURE_TYPEFLAGS_UNK24 = 0x00800000, // ? First seen in 3.2.2. Related to banner/backpack of creature/companion, used in CanInteract function by client + CREATURE_TYPEFLAGS_UNK25 = 0x01000000, // pet sounds related? + CREATURE_TYPEFLAGS_UNK26 = 0x02000000, // this one probably controls some creature visual + CREATURE_TYPEFLAGS_UNK27 = 0x04000000, // creature has no type, or forces creature to be considered as in party, may be related to creature assistance + CREATURE_TYPEFLAGS_UNK28 = 0x08000000, // used in Lua_ForceGossip + CREATURE_TYPEFLAGS_UNK29 = 0x10000000, // no idea, but it used by client }; enum CreatureEliteType From d81c9175d8be35b6310321457311159f0a3147b7 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Fri, 2 Jul 2010 05:34:27 +0400 Subject: [PATCH 12/12] Update build checks for mangosd/realmd. --- src/game/DBCStores.cpp | 22 +++++++++++++--------- src/game/ObjectMgr.cpp | 7 +++++++ src/game/SharedDefines.h | 2 +- src/game/World.cpp | 10 +++++++++- src/realmd/AuthSocket.cpp | 2 ++ src/realmd/RealmList.cpp | 3 ++- src/shared/Database/DatabaseMysql.cpp | 1 + src/shared/Database/SQLStorageImpl.h | 2 ++ 8 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index 8f0fd71fa..4cdc9c427 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -331,6 +331,7 @@ void LoadDBCStores(const std::string& dataPath) sLog.outError("Found DBC files for build %u but mangosd expected DBC for one from builds: %s Please extract correct DBC files.", build, AcceptableClientBuildsListStr().c_str()); else sLog.outError("Incorrect DataDir value in mangosd.conf or not found build info (outdated DBC files). Required one from builds: %s Please extract correct DBC files.",AcceptableClientBuildsListStr().c_str()); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -617,31 +618,34 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc"); // error checks - if(bad_dbc_files.size() >= DBCFilesCount ) + if (bad_dbc_files.size() >= DBCFilesCount ) { sLog.outError("\nIncorrect DataDir value in mangosd.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str()); + Log::WaitBeforeContinueIfNeed(); exit(1); } - else if(!bad_dbc_files.empty() ) + else if (!bad_dbc_files.empty() ) { std::string str; for(std::list::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i) str += *i + "\n"; sLog.outError("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s",(uint32)bad_dbc_files.size(),DBCFilesCount,str.c_str()); + Log::WaitBeforeContinueIfNeed(); exit(1); } // Check loaded DBC files proper version - if( !sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.3a - !sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.3a - !sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.3a - !sItemStore.LookupEntry(54860) || // last client known item added in 3.3.3a - !sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.3a - !sMapStore.LookupEntry(724) || // last map added in 3.3.3a - !sSpellStore.LookupEntry(76567) ) // last added spell in 3.3.3a + if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.5a + !sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.5a + !sGemPropertiesStore.LookupEntry(1629) || // last gem property added in 3.3.5a + !sItemStore.LookupEntry(56806) || // last client known item added in 3.3.5a + !sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.5a + !sMapStore.LookupEntry(724) || // last map added in 3.3.5a + !sSpellStore.LookupEntry(80864) ) // last added spell in 3.3.5a { sLog.outError("\nYou have mixed version DBC files. Please re-extract DBC files for one from client build: %s",AcceptableClientBuildsListStr().c_str()); + Log::WaitBeforeContinueIfNeed(); exit(1); } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index b6c687667..fe8014c01 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -2434,6 +2434,7 @@ void ObjectMgr::LoadPetLevelInfo() if(!pInfo || pInfo[0].health == 0 ) { sLog.outErrorDb("Creature %u does not have pet stats data for Level 1!",itr->first); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -2477,6 +2478,7 @@ void ObjectMgr::LoadPlayerInfo() sLog.outString(); sLog.outString( ">> Loaded %u player create definitions", count ); sLog.outErrorDb( "Error loading `playercreateinfo` table or empty table."); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -2756,6 +2758,7 @@ void ObjectMgr::LoadPlayerInfo() sLog.outString(); sLog.outString( ">> Loaded %u level health/mana definitions", count ); sLog.outErrorDb( "Error loading `player_classlevelstats` table or empty table."); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -2824,6 +2827,7 @@ void ObjectMgr::LoadPlayerInfo() if(!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0 ) { sLog.outErrorDb("Class %i Level 1 does not have health/mana data!",class_); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -2852,6 +2856,7 @@ void ObjectMgr::LoadPlayerInfo() sLog.outString(); sLog.outString( ">> Loaded %u level stats definitions", count ); sLog.outErrorDb( "Error loading `player_levelstats` table or empty table."); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -2942,6 +2947,7 @@ void ObjectMgr::LoadPlayerInfo() if(!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0 ) { sLog.outErrorDb("Race %i Class %i Level 1 does not have stats data!",race,class_); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -2975,6 +2981,7 @@ void ObjectMgr::LoadPlayerInfo() sLog.outString(); sLog.outString( ">> Loaded %u xp for level definitions", count ); sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table."); + Log::WaitBeforeContinueIfNeed(); exit(1); } diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 9f5d1c7f6..c477031e2 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2704,7 +2704,7 @@ enum TradeStatus // we need to stick to 1 version or half of the stuff will work for someone // others will not and opposite -// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5 client build 12340... +// will only support WoW, WoW:TBC and WoW:WotLK 3.3.5a client build 12340... #define EXPECTED_MANGOSD_CLIENT_BUILD {12340, 0} diff --git a/src/game/World.cpp b/src/game/World.cpp index 6d0942866..d110385d5 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -888,6 +888,7 @@ void World::SetInitialWorldSettings() !MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f) ) ) { sLog.outError("Correct *.map files not found in path '%smaps' or *.vmap/*vmdir files in '%svmaps'. Please place *.map/*.vmap/*.vmdir files in appropriate directories or correct the DataDir value in the mangosd.conf file.",m_dataPath.c_str(),m_dataPath.c_str()); + Log::WaitBeforeContinueIfNeed(); exit(1); } @@ -895,7 +896,10 @@ void World::SetInitialWorldSettings() sLog.outString(); sLog.outString("Loading MaNGOS strings..."); if (!sObjectMgr.LoadMangosStrings()) + { + Log::WaitBeforeContinueIfNeed(); exit(1); // Error message displayed in function already + } ///- Update the realm entry in the database with the realm type from the config file //No SQL injection as values are treated as integers @@ -1222,7 +1226,10 @@ void World::SetInitialWorldSettings() sLog.outString( "Initializing Scripts..." ); if(!LoadScriptingModule()) - exit(1); + { + Log::WaitBeforeContinueIfNeed(); + exit(1); // Error message displayed in function already + } ///- Initialize game time and timers sLog.outString( "DEBUG:: Initialize game time and timers" ); @@ -1334,6 +1341,7 @@ void World::DetectDBCLang() if(default_locale >= MAX_LOCALE) { sLog.outError("Unable to determine your DBC Locale! (corrupt DBC?)"); + Log::WaitBeforeContinueIfNeed(); exit(1); } diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp index 547c642b2..795da2e82 100644 --- a/src/realmd/AuthSocket.cpp +++ b/src/realmd/AuthSocket.cpp @@ -291,6 +291,7 @@ void AuthSocket::SendProof(Sha1Hash sha) case 11159: // 3.3.0a case 11403: // 3.3.2 case 11723: // 3.3.3a + case 12340: // 3.3.5a default: // or later { sAuthLogonProof_S proof; @@ -937,6 +938,7 @@ void AuthSocket::LoadRealmlist(ByteBuffer &pkt, uint32 acctid) case 11159: // 3.3.0a case 11403: // 3.3.2 case 11723: // 3.3.3a + case 12340: // 3.3.5a default: // and later { pkt << uint32(0); diff --git a/src/realmd/RealmList.cpp b/src/realmd/RealmList.cpp index 4f2fb571a..1e34b051e 100644 --- a/src/realmd/RealmList.cpp +++ b/src/realmd/RealmList.cpp @@ -36,7 +36,8 @@ extern DatabaseType LoginDatabase; // list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least) static RealmBuildInfo ExpectedRealmdClientBuilds[] = { - {11723, 3, 3, 3, 'a'}, // highest supported build, also auto accept all above for simplify future supported builds testing + {12340, 3, 3, 5, 'a'}, // highest supported build, also auto accept all above for simplify future supported builds testing + {11723, 3, 3, 3, 'a'}, {11403, 3, 3, 2, ' '}, {11159, 3, 3, 0, 'a'}, {10505, 3, 2, 2, 'a'}, diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp index eca3b6af3..02d1193ab 100644 --- a/src/shared/Database/DatabaseMysql.cpp +++ b/src/shared/Database/DatabaseMysql.cpp @@ -50,6 +50,7 @@ DatabaseMysql::DatabaseMysql() : Database(), mMysql(0) if (!mysql_thread_safe()) { sLog.outError("FATAL ERROR: Used MySQL library isn't thread-safe."); + Log::WaitBeforeContinueIfNeed(); exit(1); } } diff --git a/src/shared/Database/SQLStorageImpl.h b/src/shared/Database/SQLStorageImpl.h index ac5e87644..7b9414df6 100644 --- a/src/shared/Database/SQLStorageImpl.h +++ b/src/shared/Database/SQLStorageImpl.h @@ -126,6 +126,7 @@ void SQLStorageLoaderBase::Load(SQLStorage &store) if(!result) { sLog.outError("Error loading %s table (not exist?)\n", store.table); + Log::WaitBeforeContinueIfNeed(); exit(1); // Stop server at loading non exited table or not accessable table } @@ -159,6 +160,7 @@ void SQLStorageLoaderBase::Load(SQLStorage &store) store.RecordCount = 0; sLog.outError("Error in %s table, probably sql file format was updated (there should be %d fields in sql).\n", store.table, store.iNumFields); delete result; + Log::WaitBeforeContinueIfNeed(); exit(1); // Stop server at loading broken or non-compatible table. }