From 9c731c9a7449c2a3ea8c0e1be7dee985f7088ac2 Mon Sep 17 00:00:00 2001 From: Salja Date: Mon, 6 Aug 2012 11:50:17 +0200 Subject: [PATCH] Some struct fixes msic fixes crash fixes and and and =) Signed-off-by: Salja --- src/game/AchievementMgr.cpp | 4 +- src/game/AchievementMgr.h | 2 +- src/game/DBCStores.cpp | 44 ++++++++---- src/game/DBCStores.h | 11 +-- src/game/DBCStructure.cpp | 2 +- src/game/DBCStructure.h | 135 ++++++++++++++++++------------------ src/game/DBCfmt.h | 12 ++-- src/game/Formulas.h | 2 +- 8 files changed, 116 insertions(+), 96 deletions(-) diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index d25c90fc0..339e66050 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -2309,7 +2309,7 @@ void AchievementGlobalMgr::SetRealmCompleted(AchievementEntry const* achievement m_allCompletedAchievements.insert(achievement->ID); } -/*void AchievementGlobalMgr::LoadAchievementCriteriaList() +void AchievementGlobalMgr::LoadAchievementCriteriaList() { if (sAchievementCriteriaStore.GetNumRows() == 0) { @@ -2349,7 +2349,7 @@ void AchievementGlobalMgr::SetRealmCompleted(AchievementEntry const* achievement sLog.outString(); sLog.outString(">> Loaded %u achievement criteria.", count); -}*/ +} void AchievementGlobalMgr::LoadAchievementReferenceList() { diff --git a/src/game/AchievementMgr.h b/src/game/AchievementMgr.h index d8ab7b09a..1621d98cf 100644 --- a/src/game/AchievementMgr.h +++ b/src/game/AchievementMgr.h @@ -320,7 +320,7 @@ class AchievementGlobalMgr bool IsRealmCompleted(AchievementEntry const* achievement) const; void SetRealmCompleted(AchievementEntry const* achievement); - //void LoadAchievementCriteriaList(); + void LoadAchievementCriteriaList(); void LoadAchievementCriteriaRequirements(); void LoadAchievementReferenceList(); void LoadCompletedAchievements(); diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index 9f8aaf5dd..e68d115c3 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -203,6 +203,9 @@ static uint32 sTalentTabPages[MAX_CLASSES][3]; DBCStorage sTaxiNodesStore(TaxiNodesEntryfmt); TaxiMask sTaxiNodesMask; TaxiMask sOldContinentsNodesMask; +TaxiMask sHordeTaxiNodesMask; +TaxiMask sAllianceTaxiNodesMask; +TaxiMask sDeathKnightTaxiNodesMask; // DBC used only for initialization sTaxiPathSetBySource at startup. TaxiPathSetBySource sTaxiPathSetBySource; @@ -219,6 +222,7 @@ DBCStorage sWMOAreaTableStore(WMOAreaTableEntryfmt); DBCStorage sWorldMapAreaStore(WorldMapAreaEntryfmt); DBCStorage sWorldMapOverlayStore(WorldMapOverlayEntryfmt); DBCStorage sWorldSafeLocsStore(WorldSafeLocsEntryfmt); +DBCStorage sWorldPvPAreaStore(WorldPvPAreaEnrtyfmt); typedef std::list StoreProblemList; @@ -669,6 +673,9 @@ void LoadDBCStores(const std::string& dataPath) memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask)); memset(sOldContinentsNodesMask,0,sizeof(sTaxiNodesMask)); + memset(sHordeTaxiNodesMask, 0, sizeof(sHordeTaxiNodesMask)); + memset(sAllianceTaxiNodesMask, 0, sizeof(sAllianceTaxiNodesMask)); + memset(sDeathKnightTaxiNodesMask, 0, sizeof(sDeathKnightTaxiNodesMask)); for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i) { TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i); @@ -698,9 +705,21 @@ void LoadDBCStores(const std::string& dataPath) uint32 submask = 1<<((i-1)%32); sTaxiNodesMask[field] |= submask; + if (node->MountCreatureID[0] && node->MountCreatureID[0] != 32981) + sHordeTaxiNodesMask[field] |= submask; + if (node->MountCreatureID[1] && node->MountCreatureID[1] != 32981) + sAllianceTaxiNodesMask[field] |= submask; + if (node->MountCreatureID[0] == 32981 || node->MountCreatureID[1] == 32981) + sDeathKnightTaxiNodesMask[field] |= submask; + // old continent node (+ nodes virtually at old continents, check explicitly to avoid loading map files for zone info) if (node->map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94) sOldContinentsNodesMask[field] |= submask; + + // fix DK node at Ebon Hold + if (i == 315) { + ((TaxiNodesEntry*)node)->MountCreatureID[1] = 32981; + } } } @@ -738,11 +757,11 @@ void LoadDBCStores(const std::string& dataPath) } // Check loaded DBC files proper version - if (!sAreaStore.LookupEntry(4713) || // last area (areaflag) added in 4.3.4 - !sCharTitlesStore.LookupEntry(287) || // last char title added in 4.3.4 - !sGemPropertiesStore.LookupEntry(2250) || // last gem property added in 4.3.4 - !sMapStore.LookupEntry(980) || // last map added in 4.3.4 - !sSpellStore.LookupEntry(110966) ) // last added spell in 4.3.4 + if (!sAreaStore.LookupEntry(4713) || // last area (areaflag) added in 4.3.4 + !sCharTitlesStore.LookupEntry(287) || // last char title added in 4.3.4 + !sGemPropertiesStore.LookupEntry(2250) || // last gem property added in 4.3.4 + !sMapStore.LookupEntry(980) || // last map added in 4.3.4 + !sSpellStore.LookupEntry(121820) ) // last added spell in 4.3.4 { sLog.outError("\nYou have mixed version DBC files. Please re-extract DBC files for one from client build: %s",AcceptableClientBuildsListStr().c_str()); Log::WaitBeforeContinueIfNeed(); @@ -851,30 +870,27 @@ uint32 GetAreaFlagByMapId(uint32 mapid) uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId) { - if(mapid != 530 && mapid != 571) // speed for most cases + if (mapid != 530 && mapid != 571 && mapid != 732) // speed for most cases return mapid; - if(WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId)) + if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId)) return wma->virtual_map_id >= 0 ? wma->virtual_map_id : wma->map_id; return mapid; } -ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId) +ContentLevels GetContentLevelsForMap(uint32 mapid) { - mapid = GetVirtualMapForMapAndZone(mapid,zoneId); - if(mapid < 2) - return CONTENT_1_60; - MapEntry const* mapEntry = sMapStore.LookupEntry(mapid); - if(!mapEntry) + if (!mapEntry) return CONTENT_1_60; - switch(mapEntry->Expansion()) + switch (mapEntry->Expansion()) { default: return CONTENT_1_60; case 1: return CONTENT_61_70; case 2: return CONTENT_71_80; + case 3: return CONTENT_81_85; } } diff --git a/src/game/DBCStores.h b/src/game/DBCStores.h index 8d8da6497..1d218fe33 100644 --- a/src/game/DBCStores.h +++ b/src/game/DBCStores.h @@ -51,9 +51,10 @@ enum ContentLevels { CONTENT_1_60 = 0, CONTENT_61_70, - CONTENT_71_80 + CONTENT_71_80, + CONTENT_81_85, }; -ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId); +ContentLevels GetContentLevelsForMap(uint32 mapid); ChatChannelsEntry const* GetChannelEntryFor(uint32 channel_id); @@ -118,7 +119,6 @@ extern DBCStorage sCreatureDisplayInfoExtraStore; extern DBCStorage sCreatureFamilyStore; extern DBCStorage sCreatureSpellDataStore; extern DBCStorage sCreatureTypeStore; -//extern DBCStorage sCurrencyTypesStore; extern DBCStorage sDungeonEncounterStore; extern DBCStorage sDurabilityCostsStore; extern DBCStorage sDurabilityQualityStore; @@ -156,7 +156,6 @@ extern DBCStorage sItemDamageThrownStore; extern DBCStorage sItemDamageTwoHandStore; extern DBCStorage sItemDamageTwoHandCasterStore; extern DBCStorage sItemDamageWandStore; -//extern DBCStorage sItemExtendedCostStore; //extern DBCStorage sItemDisplayInfoStore; -- not used currently extern DBCStorage sItemLimitCategoryStore; extern DBCStorage sItemRandomPropertiesStore; @@ -218,6 +217,9 @@ extern DBCStorage sTaxiNodesStore; extern DBCStorage sTaxiPathStore; extern TaxiMask sTaxiNodesMask; extern TaxiMask sOldContinentsNodesMask; +extern TaxiMask sHordeTaxiNodesMask; +extern TaxiMask sAllianceTaxiNodesMask; +extern TaxiMask sDeathKnightTaxiNodesMask; extern TaxiPathSetBySource sTaxiPathSetBySource; extern TaxiPathNodesByPath sTaxiPathNodesByPath; extern DBCStorage sTotemCategoryStore; @@ -227,6 +229,7 @@ extern DBCStorage sWMOAreaTableStore; //extern DBCStorage sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates extern DBCStorage sWorldMapOverlayStore; extern DBCStorage sWorldSafeLocsStore; +extern DBCStorage sWorldPvPAreaStore; void LoadDBCStores(const std::string& dataPath); diff --git a/src/game/DBCStructure.cpp b/src/game/DBCStructure.cpp index 535583c8a..df74bbb02 100644 --- a/src/game/DBCStructure.cpp +++ b/src/game/DBCStructure.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 MaNGOS + * Copyright (C) 2005-2012 MaNGOS * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index e1faaa3ef..ea32c1829 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -42,28 +42,28 @@ typedef char const* const* DBCString; //char* DBCStrings[M struct AchievementEntry { - uint32 ID; // 0 m_ID - uint32 factionFlag; // 1 m_faction -1=all, 0=horde, 1=alliance - uint32 mapID; // 2 m_instance_id -1=none - //uint32 parentAchievement; // 3 m_supercedes its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin) - DBCString name; // 4 m_title_lang - //char *description; // 5 m_description_lang - uint32 categoryId; // 6 m_category - uint32 points; // 7 m_points - //uint32 OrderInCategory; // 8 m_ui_order - uint32 flags; // 9 m_flags - //uint32 icon; // 10 m_iconID - //char *titleReward; // 11 m_reward_lang - uint32 count; // 12 m_minimum_criteria - need this count of completed criterias (own or referenced achievement criterias) - uint32 refAchievement; // 13 m_shares_criteria - referenced achievement (counting of all completed criterias) + uint32 ID; // 0 m_ID + uint32 factionFlag; // 1 m_faction -1=all, 0=horde, 1=alliance + uint32 mapID; // 2 m_instance_id -1=none + uint32 parentAchievement; // 3 m_supercedes its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin) + DBCString name; // 4 m_title_lang + DBCString description; // 5 m_description_lang + uint32 categoryId; // 6 m_category + uint32 points; // 7 m_points + uint32 OrderInCategory; // 8 m_ui_order + uint32 flags; // 9 m_flags + uint32 icon; // 10 m_iconID + DBCString titleReward; // 11 m_reward_lang + uint32 count; // 12 m_minimum_criteria - need this count of completed criterias (own or referenced achievement criterias) + uint32 refAchievement; // 13 m_shares_criteria - referenced achievement (counting of all completed criterias) }; struct AchievementCategoryEntry { uint32 ID; // 0 m_ID uint32 parentCategory; // 1 m_parent -1 for main category - //char *name; // 2 m_name_lang - //uint32 sortOrder; // 3 m_ui_order + DBCString name; // 2 m_name_lang + uint32 sortOrder; // 3 m_ui_order }; struct AchievementCriteriaEntry @@ -488,17 +488,17 @@ struct AchievementCriteriaEntry uint32 additionalRequirement2_value; // 8 m_fail_asset } raw; }; - DBCString name; // 9 m_description_lang - uint32 completionFlag; // 10 m_flags - uint32 timedCriteriaStartType; // 11 m_timer_start_event Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting + //uint32 unk1; // 9 + DBCString name; // 10 m_description_lang + uint32 completionFlag; // 11 m_flags + uint32 timedCriteriaStartType; // 12 m_timer_start_event Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting // 1: ByEventId(?) (serverside IDs), 2: ByQuestId, 5: ByCastSpellId(?) // 6: BySpellIdTarget(some of these are unknown spells, some not, some maybe spells) // 7: ByKillNpcId, 9: ByUseItemId - uint32 timedCriteriaMiscId; // 12 m_timer_asset_id Alway appears with timed events, used internally to start the achievement, store - uint32 timeLimit; // 13 m_timer_time time limit in seconds - uint32 showOrder; // 14 m_ui_order also used in achievement shift-links as index in state bitmask - //uint32 unk1; // 15 only one value, still unknown - //uint32 unk2; // 16 all zeros + uint32 timedCriteriaMiscId; // 13 m_timer_asset_id Alway appears with timed events, used internally to start the achievement, store + uint32 timeLimit; // 14 m_timer_time time limit in seconds + uint32 showOrder; // 15 m_ui_order also used in achievement shift-links as index in state bitmask + //uint32 unk2; // 16 //uint32 moreRequirement[3]; // 17-19 //uint32 moreRequirementValue[3]; // 20-22 @@ -1253,26 +1253,26 @@ struct MailTemplateEntry struct MapEntry { - uint32 MapID; // 0 m_ID - //char* internalname; // 1 m_Directory - uint32 map_type; // 2 m_InstanceType - //uint32 mapFlags; // 3 m_Flags (0x100 - CAN_CHANGE_PLAYER_DIFFICULTY) - //uint32 unk4; // 4 4.0.1 - //uint32 isPvP; // 5 m_PVP 0 or 1 for battlegrounds (not arenas) - DBCString name; // 6 m_MapName_lang - uint32 linked_zone; // 7 m_areaTableID - //char* hordeIntro; // 8 m_MapDescription0_lang - //char* allianceIntro; // 9 m_MapDescription1_lang - uint32 multimap_id; // 10 m_LoadingScreenID (LoadingScreens.dbc) - //float BattlefieldMapIconScale; // 11 m_minimapIconScale - int32 ghost_entrance_map; // 12 m_corpseMapID map_id of entrance map in ghost mode (continent always and in most cases = normal entrance) - float ghost_entrance_x; // 13 m_corpseX entrance x coordinate in ghost mode (in most cases = normal entrance) - float ghost_entrance_y; // 14 m_corpseY entrance y coordinate in ghost mode (in most cases = normal entrance) - //uint32 timeOfDayOverride; // 15 m_timeOfDayOverride - uint32 addon; // 16 m_expansionID - //uint32 unkTime; // 17 m_raidOffset - //uint32 maxPlayers; // 18 m_maxPlayers - uint32 NextPhaseMap; // 19 - MapId for next phase. + uint32 MapID; // 0 m_ID + DBCString internalname; // 1 m_Directory + uint32 map_type; // 2 m_InstanceType + uint32 mapFlags; // 3 m_Flags (0x100 - CAN_CHANGE_PLAYER_DIFFICULTY) + uint32 unk4; // 4 4.0.1 + uint32 isPvP; // 5 m_PVP 0 or 1 for battlegrounds (not arenas) + DBCString name; // 6 m_MapName_lang + uint32 linked_zone; // 7 m_areaTableID + DBCString hordeIntro; // 8 m_MapDescription0_lang + DBCString allianceIntro; // 9 m_MapDescription1_lang + uint32 multimap_id; // 10 m_LoadingScreenID (LoadingScreens.dbc) + float BattlefieldMapIconScale; // 11 m_minimapIconScale + int32 ghost_entrance_map; // 12 m_corpseMapID map_id of entrance map in ghost mode (continent always and in most cases = normal entrance) + float ghost_entrance_x; // 13 m_corpseX entrance x coordinate in ghost mode (in most cases = normal entrance) + float ghost_entrance_y; // 14 m_corpseY entrance y coordinate in ghost mode (in most cases = normal entrance) + uint32 timeOfDayOverride; // 15 m_timeOfDayOverride + uint32 addon; // 16 m_expansionID + uint32 unkTime; // 17 m_raidOffset + uint32 maxPlayers; // 18 m_maxPlayers + uint32 NextPhaseMap; // 19 - MapId for next phase. // Helpers uint32 Expansion() const { return addon; } @@ -1302,24 +1302,15 @@ struct MapEntry struct MapDifficultyEntry { - //uint32 Id; // 0 m_ID + uint32 Id; // 0 m_ID uint32 MapId; // 1 m_mapID uint32 Difficulty; // 2 m_difficulty (for arenas: arena slot) - //char* areaTriggerText; // 3 m_message_lang (text showed when transfer to map failed) + DBCString areaTriggerText; // 3 m_message_lang (text showed when transfer to map failed) uint32 resetTime; // 4, m_raidDuration in secs, 0 if no fixed reset time uint32 maxPlayers; // 5, m_maxPlayers some heroic versions have 0 when expected same amount as in normal version - //char* difficultyString; // 6 m_difficultystring + DBCString difficultyString; // 6 m_difficultystring }; -// Additional 335 fields to MapDifficulty -/* - //char* areaTriggerText[16]; // 3-18 m_message_lang (text showed when transfer to map failed) - //uint32 textFlags; // 19 - uint32 resetTime; // 20 m_raidDuration in secs, 0 if no fixed reset time - uint32 maxPlayers; // 21 m_maxPlayers some heroic versions have 0 when expected same amount as in normal version - //char* difficultyString; // 22 -*/ - struct MovieEntry { uint32 Id; // 0 m_ID @@ -1378,11 +1369,10 @@ struct QuestXPLevel struct RandomPropertiesPointsEntry { - //uint32 Id; // 0 m_ID - uint32 itemLevel; // 1 m_ItemLevel - uint32 EpicPropertiesPoints[5]; // 2-6 m_Epic - uint32 RarePropertiesPoints[5]; // 7-11 m_Superior - uint32 UncommonPropertiesPoints[5]; // 12-16 m_Good + uint32 itemLevel; // 0 m_ItemLevel + uint32 EpicPropertiesPoints[5]; // 1-5 m_Epic + uint32 RarePropertiesPoints[5]; // 6-10 m_Superior + uint32 UncommonPropertiesPoints[5]; // 11-15 m_Good }; struct ScalingStatDistributionEntry @@ -1549,12 +1539,12 @@ struct SkillLineAbilityEntry struct SoundEntriesEntry { - uint32 Id; // 0 m_ID - //uint32 Type; // 1 m_soundType - //char* InternalName; // 2 m_name - //char* FileName[10]; // 3-12 m_File[10] - //uint32 Unk13[10]; // 13-22 m_Freq[10] - //char* Path; // 23 m_DirectoryBase + uint32 Id; // 0 m_ID + uint32 Type; // 1 m_soundType + DBCString InternalName; // 2 m_name + DBCString FileName[10]; // 3-12 m_File[10] + DBCString Unk13[10]; // 13-22 m_Freq[10] + DBCString Path; // 23 m_DirectoryBase // 24 m_volumeFloat // 25 m_flags // 26 m_minDistance @@ -2348,6 +2338,17 @@ struct WorldSafeLocsEntry //char* name; // 5 m_AreaName_lang }; +struct WorldPvPAreaEntry +{ + uint32 Id; // 0 m_battlefieldId + uint32 ZoneId; // 1 m_zoneId + uint32 NoWarTimeState; // 2 m_noWarTimeState + uint32 WarTimeState; // 3 m_warTimeState + uint32 ukn1; // 4 m_unk1 not known yet, both 900 + uint32 minLevel; // 5 m_minLevel + uint32 ukn2; // 6 m_unk2 +}; + // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform #if defined( __GNUC__ ) #pragma pack() diff --git a/src/game/DBCfmt.h b/src/game/DBCfmt.h index 727d74b75..1f870150a 100644 --- a/src/game/DBCfmt.h +++ b/src/game/DBCfmt.h @@ -19,7 +19,7 @@ #ifndef MANGOS_DBCSFRM_H #define MANGOS_DBCSFRM_H -const char Achievementfmt[]="niixsxiixixxii"; +const char Achievementfmt[]="niiissiiiiisii"; const char AchievementCriteriafmt[]="niiiiiiiixsiiiiixxxxxxx"; const char AreaTableEntryfmt[]="iiinixxxxxisixxxxxxxxxxxxx"; const char AreaGroupEntryfmt[]="niiiiiii"; @@ -41,8 +41,8 @@ const char CreatureDisplayInfofmt[]="nxxifxxxxxxxxxxxx"; const char CreatureDisplayInfoExtrafmt[]="nixxxxxxxxxxxxxxxxxxx"; const char CreatureFamilyfmt[]="nfifiiiiixsx"; const char CreatureSpellDatafmt[]="niiiixxxx"; -const char CreatureTypefmt[]="nxx"; const char DungeonEncounterfmt[]="niiiisxx"; +const char CreatureTypefmt[]="nxx"; const char DurabilityCostsfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; const char DurabilityQualityfmt[]="nf"; const char EmotesEntryfmt[]="nxxiiixx"; @@ -72,7 +72,6 @@ const char ItemArmorTotalfmt[]="niffff"; const char ItemBagFamilyfmt[]="nx"; //const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx"; //const char ItemCondExtCostsEntryfmt[]="xiii"; -//const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiiix"; const char ItemDamagefmt[]="nfffffffi"; const char ItemLimitCategoryEntryfmt[]="nxii"; const char ItemRandomPropertiesfmt[]="nxiiiiis"; @@ -80,8 +79,8 @@ const char ItemRandomSuffixfmt[]="nsxiiiiiiiiii"; const char ItemSetEntryfmt[]="dsxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii"; const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; const char MailTemplateEntryfmt[]="nxs"; -const char MapEntryfmt[]="nxixxxsixxixiffxixxi"; -const char MapDifficultyEntryfmt[]="diixiix"; +const char MapEntryfmt[]="nsiiiisissififfiiiii"; +const char MapDifficultyEntryfmt[]="niisiis"; const char MovieEntryfmt[]="nxxx"; const char OverrideSpellDatafmt[]="niiiiiiiiiixx"; const char QuestFactionRewardfmt[]="niiiiiiiiii"; @@ -95,7 +94,7 @@ const char ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxx const char SkillLinefmt[]="nisxixi"; const char SkillLineAbilityfmt[]="niiiixxiiiiixx"; const char SkillRaceClassInfofmt[]="diiiiixxx"; -const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +const char SoundEntriesfmt[]="nissssssssssssssssssssssxxxxxxxxxxx"; const char SpellCastTimefmt[]="nixx"; const char SpellDurationfmt[]="niii"; const char SpellDifficultyfmt[]="niiii"; @@ -137,5 +136,6 @@ const char WMOAreaTableEntryfmt[]="niiixxxxxiixxxx"; const char WorldMapAreaEntryfmt[]="xinxffffixxxxx"; const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxx"; const char WorldSafeLocsEntryfmt[]="nifffx"; +const char WorldPvPAreaEnrtyfmt[]="niiiiii"; #endif diff --git a/src/game/Formulas.h b/src/game/Formulas.h index fbd182d75..ccce7f9cc 100644 --- a/src/game/Formulas.h +++ b/src/game/Formulas.h @@ -115,7 +115,7 @@ namespace MaNGOS (((Creature*)u)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL))) return 0; - uint32 xp_gain = BaseGain(pl->getLevel(), u->getLevel(), GetContentLevelsForMapAndZone(pl->GetMapId(), pl->GetZoneId())); + uint32 xp_gain = BaseGain(pl->getLevel(), u->getLevel(), GetContentLevelsForMap(pl->GetMapId())); if (xp_gain == 0) return 0;