From 4f17a6a4e26c606fc85c7385a707110abc83e62b Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 26 Mar 2009 17:07:35 +0300 Subject: [PATCH 01/10] [7543] Avoid code duplication in ReputationMgr. --- src/game/ReputationMgr.cpp | 71 +++++++------------------------------- src/game/ReputationMgr.h | 15 +++++--- src/shared/revision_nr.h | 2 +- 3 files changed, 24 insertions(+), 64 deletions(-) diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 872bc06f2..354389279 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -217,7 +217,7 @@ void ReputationMgr::Initilize() } } -bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing) +bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental) { SimpleFactionsList const* flist = GetFactionTeamList(factionEntry->ID); if (flist) @@ -227,26 +227,29 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi { FactionEntry const *factionEntryCalc = sFactionStore.LookupEntry(*itr); if(factionEntryCalc) - res = SetOneFactionReputation(factionEntryCalc, standing); + res = SetOneFactionReputation(factionEntryCalc, standing, incremental); } return res; } else - return SetOneFactionReputation(factionEntry, standing); + return SetOneFactionReputation(factionEntry, standing, incremental); } -bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing) +bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental) { FactionStateList::iterator itr = m_factions.find(factionEntry->reputationListID); if (itr != m_factions.end()) { + int32 BaseRep = GetBaseReputation(factionEntry); + + if(incremental) + standing += itr->second.Standing + BaseRep; + if (standing > Reputation_Cap) standing = Reputation_Cap; - else - if (standing < Reputation_Bottom) - standing = Reputation_Bottom; + else if (standing < Reputation_Bottom) + standing = Reputation_Bottom; - int32 BaseRep = GetBaseReputation(factionEntry); itr->second.Standing = standing - BaseRep; itr->second.Changed = true; @@ -258,57 +261,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in SendState(&itr->second); m_player->ReputationChanged(factionEntry); - m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION,factionEntry->ID); - m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION,factionEntry->ID); - return true; - } - return false; -} - -bool ReputationMgr::ModifyReputation(FactionEntry const* factionEntry, int32 standing) -{ - SimpleFactionsList const* flist = GetFactionTeamList(factionEntry->ID); - if (flist) - { - bool res = false; - for (SimpleFactionsList::const_iterator itr = flist->begin();itr != flist->end();++itr) - { - FactionEntry const *factionEntryCalc = sFactionStore.LookupEntry(*itr); - if(factionEntryCalc) - res = ModifyOneFactionReputation(factionEntryCalc, standing); - } - return res; - } - else - return ModifyOneFactionReputation(factionEntry, standing); -} - -bool ReputationMgr::ModifyOneFactionReputation(FactionEntry const* factionEntry, int32 standing) -{ - FactionStateList::iterator itr = m_factions.find(factionEntry->reputationListID); - if (itr != m_factions.end()) - { - int32 BaseRep = GetBaseReputation(factionEntry); - int32 new_rep = BaseRep + itr->second.Standing + standing; - - if (new_rep > Reputation_Cap) - new_rep = Reputation_Cap; - else - if (new_rep < Reputation_Bottom) - new_rep = Reputation_Bottom; - - if(ReputationToRank(new_rep) <= REP_HOSTILE) - SetAtWar(&itr->second,true); - - itr->second.Standing = new_rep - BaseRep; - itr->second.Changed = true; - - SetVisible(&itr->second); - SendState(&itr->second); - - m_player->ReputationChanged(factionEntry); - - m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION,factionEntry->ID); + m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, factionEntry->ID); m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION,factionEntry->ID); return true; diff --git a/src/game/ReputationMgr.h b/src/game/ReputationMgr.h index edc60edfd..99a1361ab 100644 --- a/src/game/ReputationMgr.h +++ b/src/game/ReputationMgr.h @@ -95,8 +95,14 @@ class ReputationMgr } public: // modifiers - bool SetReputation(FactionEntry const* factionEntry, int32 standing); - bool ModifyReputation(FactionEntry const* factionEntry, int32 standing); + bool SetReputation(FactionEntry const* factionEntry, int32 standing) + { + return SetReputation(factionEntry, standing, false); + } + bool ModifyReputation(FactionEntry const* factionEntry, int32 standing) + { + return SetReputation(factionEntry, standing, true); + } void SetVisible(FactionTemplateEntry const* factionTemplateEntry); void SetVisible(FactionEntry const* factionEntry); @@ -114,12 +120,13 @@ class ReputationMgr private: // internal helper functions void Initilize(); uint32 GetDefaultStateFlags(const FactionEntry *factionEntry) const; - bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing); - bool ModifyOneFactionReputation(FactionEntry const* factionEntry, int32 standing); + bool SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental); + bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental); void SetVisible(FactionState* faction); void SetAtWar(FactionState* faction, bool atWar); void SetInactive(FactionState* faction, bool inactive); void SendVisible(FactionState const* faction) const; + void UpdateRankCounters( ReputationRank old_rank, ReputationRank new_rank ); private: Player* m_player; FactionStateList m_factions; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 46cde255f..859dce3be 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7542" + #define REVISION_NR "7543" #endif // __REVISION_NR_H__ From 68ec6ae8abf03c59bca7ce930fcb9019cff5f910 Mon Sep 17 00:00:00 2001 From: invliD Date: Thu, 26 Mar 2009 16:23:57 +0100 Subject: [PATCH 02/10] Moved table uptime from world database to character database. Signed-off-by: Triply --- sql/characters.sql | 24 ++++++++++++++++++++++- sql/mangos.sql | 24 +---------------------- sql/updates/7544_01_mangos_uptime.sql | 3 +++ sql/updates/7544_02_characters_uptime.sql | 14 +++++++++++++ sql/updates/Makefile.am | 4 ++++ src/game/World.cpp | 6 +++--- src/shared/revision_nr.h | 2 +- 7 files changed, 49 insertions(+), 28 deletions(-) create mode 100644 sql/updates/7544_01_mangos_uptime.sql create mode 100644 sql/updates/7544_02_characters_uptime.sql diff --git a/sql/characters.sql b/sql/characters.sql index 470f77545..acb64945f 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -21,7 +21,7 @@ DROP TABLE IF EXISTS `character_db_version`; CREATE TABLE `character_db_version` ( - `required_7324_02_characters_character_aura` bit(1) default NULL + `required_7544_02_characters_uptime` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; -- @@ -1321,6 +1321,28 @@ LOCK TABLES `saved_variables` WRITE; /*!40000 ALTER TABLE `saved_variables` DISABLE KEYS */; /*!40000 ALTER TABLE `saved_variables` ENABLE KEYS */; UNLOCK TABLES; + +-- +-- Table structure for table `uptime` +-- + +DROP TABLE IF EXISTS `uptime`; +CREATE TABLE `uptime` ( + `starttime` bigint(20) unsigned NOT NULL default '0', + `startstring` varchar(64) NOT NULL default '', + `uptime` bigint(20) unsigned NOT NULL default '0', + `maxplayers` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`starttime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; + +-- +-- Dumping data for table `uptime` +-- + +LOCK TABLES `uptime` WRITE; +/*!40000 ALTER TABLE `uptime` DISABLE KEYS */; +/*!40000 ALTER TABLE `uptime` ENABLE KEYS */; +UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/sql/mangos.sql b/sql/mangos.sql index 574570af3..3c1e671eb 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, - `required_7536_01_mangos_spell_chain` bit(1) default NULL + `required_7544_01_mangos_uptime` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -17851,28 +17851,6 @@ LOCK TABLES `transports` WRITE; /*!40000 ALTER TABLE `transports` DISABLE KEYS */; /*!40000 ALTER TABLE `transports` ENABLE KEYS */; UNLOCK TABLES; - --- --- Table structure for table `uptime` --- - -DROP TABLE IF EXISTS `uptime`; -CREATE TABLE `uptime` ( - `starttime` bigint(20) unsigned NOT NULL default '0', - `startstring` varchar(64) NOT NULL default '', - `uptime` bigint(20) unsigned NOT NULL default '0', - `maxplayers` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`starttime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; - --- --- Dumping data for table `uptime` --- - -LOCK TABLES `uptime` WRITE; -/*!40000 ALTER TABLE `uptime` DISABLE KEYS */; -/*!40000 ALTER TABLE `uptime` ENABLE KEYS */; -UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/sql/updates/7544_01_mangos_uptime.sql b/sql/updates/7544_01_mangos_uptime.sql new file mode 100644 index 000000000..223f3f630 --- /dev/null +++ b/sql/updates/7544_01_mangos_uptime.sql @@ -0,0 +1,3 @@ +ALTER TABLE db_version CHANGE COLUMN required_7536_01_mangos_spell_chain required_7544_01_mangos_uptime bit; + +DROP TABLE IF EXISTS `uptime`; \ No newline at end of file diff --git a/sql/updates/7544_02_characters_uptime.sql b/sql/updates/7544_02_characters_uptime.sql new file mode 100644 index 000000000..5251056a7 --- /dev/null +++ b/sql/updates/7544_02_characters_uptime.sql @@ -0,0 +1,14 @@ +ALTER TABLE character_db_version CHANGE COLUMN required_7324_02_characters_character_aura required_7544_02_characters_uptime bit; + +-- +-- Table structure for table `uptime` +-- + +DROP TABLE IF EXISTS `uptime`; +CREATE TABLE `uptime` ( + `starttime` bigint(20) unsigned NOT NULL default '0', + `startstring` varchar(64) NOT NULL default '', + `uptime` bigint(20) unsigned NOT NULL default '0', + `maxplayers` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`starttime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index c770d6133..aeed1e308 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -202,6 +202,8 @@ pkgdata_DATA = \ 7495_01_mangos_mangos_string.sql \ 7503_01_mangos_command.sql \ 7536_01_mangos_spell_chain.sql \ + 7544_01_mangos_uptime.sql \ + 7544_02_characters_uptime.sql \ README ## Additional files to include when running 'make dist' @@ -384,4 +386,6 @@ EXTRA_DIST = \ 7495_01_mangos_mangos_string.sql \ 7503_01_mangos_command.sql \ 7536_01_mangos_spell_chain.sql \ + 7544_01_mangos_uptime.sql \ + 7544_02_characters_uptime.sql \ README diff --git a/src/game/World.cpp b/src/game/World.cpp index ffed8212d..6382d02b9 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1365,7 +1365,7 @@ void World::SetInitialWorldSettings() sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d", local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec); - WorldDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)", + loginDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)", isoDate, uint64(m_startTime)); m_timers[WUPDATE_OBJECTS].SetInterval(0); @@ -1532,10 +1532,10 @@ void World::Update(uint32 diff) if (m_timers[WUPDATE_UPTIME].Passed()) { uint32 tmpDiff = (m_gameTime - m_startTime); - uint32 maxClientsNum = sWorld.GetMaxActiveSessionCount(); + uint32 maxClientsNum = GetMaxActiveSessionCount(); m_timers[WUPDATE_UPTIME].Reset(); - WorldDatabase.PExecute("UPDATE uptime SET uptime = %d, maxplayers = %d WHERE starttime = " I64FMTD, tmpDiff, maxClientsNum, uint64(m_startTime)); + loginDatabase.PExecute("UPDATE uptime SET uptime = %d, maxplayers = %d WHERE starttime = " I64FMTD, tmpDiff, maxClientsNum, uint64(m_startTime)); } ///
  • Handle all other objects diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 859dce3be..06ca28eb3 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7543" + #define REVISION_NR "7544" #endif // __REVISION_NR_H__ From ff0c31e103ae23207e3a7c0e7e455ff317dfba54 Mon Sep 17 00:00:00 2001 From: DonTomika Date: Thu, 26 Mar 2009 17:03:30 +0100 Subject: [PATCH 03/10] [7545] Fixed exploration achievements for certian areas --- src/game/AchievementMgr.cpp | 22 ++++++++++++++++------ src/shared/Database/DBCStructure.h | 2 +- src/shared/Database/DBCfmt.cpp | 2 +- src/shared/revision_nr.h | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index edc8a708c..3e570fcb1 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -725,14 +725,24 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui if(!worldOverlayEntry) break; - int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID); - if(exploreFlag < 0) - break; + bool matchFound = false; + for (int i = 0; i < 3; ++i) + { + int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID[i]); + if(exploreFlag < 0) + break; - uint32 playerIndexOffset = uint32(exploreFlag) / 32; - uint32 mask = 1<< (uint32(exploreFlag) % 32); + uint32 playerIndexOffset = uint32(exploreFlag) / 32; + uint32 mask = 1<< (uint32(exploreFlag) % 32); - if(GetPlayer()->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + playerIndexOffset) & mask) + if(GetPlayer()->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + playerIndexOffset) & mask) + { + matchFound = true; + break; + } + } + + if(matchFound) SetCriteriaProgress(achievementCriteria, 1); break; } diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h index 2f1b0b1ae..58c3e5d52 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/shared/Database/DBCStructure.h @@ -1609,7 +1609,7 @@ struct WorldSafeLocsEntry struct WorldMapOverlayEntry { uint32 ID; // 0 - uint32 areatableID; // 2 + uint32 areatableID[4]; // 2-5 }; // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp index 5049fcdf3..c46e8614d 100644 --- a/src/shared/Database/DBCfmt.cpp +++ b/src/shared/Database/DBCfmt.cpp @@ -96,4 +96,4 @@ const char VehicleEntryfmt[]="niffffiiiiiiiiffffiiiiiifffffffffffssssfifi"; const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii"; const char WorldMapAreaEntryfmt[]="xinxffffix"; const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx"; -const char WorldMapOverlayEntryfmt[]="nxixxxxxxxxxxxxxx"; +const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxxx"; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 06ca28eb3..a102f831d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7544" + #define REVISION_NR "7545" #endif // __REVISION_NR_H__ From b09df0aadeb2010d633b1fa13a8b2b64d5a5ee37 Mon Sep 17 00:00:00 2001 From: Triply Date: Thu, 26 Mar 2009 17:56:42 +0100 Subject: [PATCH 04/10] [7546] Revert [7544] correcty move uptime table to Realm database, use realmid column. Signed-off-by: Triply --- sql/characters.sql | 24 +--------------------- sql/realmd.sql | 25 ++++++++++++++++++++++- sql/updates/7546_01_characters_uptime.sql | 3 +++ sql/updates/7546_02_realmd_uptime.sql | 16 +++++++++++++++ sql/updates/Makefile.am | 4 ++++ src/game/World.cpp | 6 +++--- src/shared/revision_nr.h | 2 +- 7 files changed, 52 insertions(+), 28 deletions(-) create mode 100644 sql/updates/7546_01_characters_uptime.sql create mode 100644 sql/updates/7546_02_realmd_uptime.sql diff --git a/sql/characters.sql b/sql/characters.sql index acb64945f..bfa6ec967 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -21,7 +21,7 @@ DROP TABLE IF EXISTS `character_db_version`; CREATE TABLE `character_db_version` ( - `required_7544_02_characters_uptime` bit(1) default NULL + `required_7546_01_characters_uptime` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; -- @@ -1321,28 +1321,6 @@ LOCK TABLES `saved_variables` WRITE; /*!40000 ALTER TABLE `saved_variables` DISABLE KEYS */; /*!40000 ALTER TABLE `saved_variables` ENABLE KEYS */; UNLOCK TABLES; - --- --- Table structure for table `uptime` --- - -DROP TABLE IF EXISTS `uptime`; -CREATE TABLE `uptime` ( - `starttime` bigint(20) unsigned NOT NULL default '0', - `startstring` varchar(64) NOT NULL default '', - `uptime` bigint(20) unsigned NOT NULL default '0', - `maxplayers` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`starttime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; - --- --- Dumping data for table `uptime` --- - -LOCK TABLES `uptime` WRITE; -/*!40000 ALTER TABLE `uptime` DISABLE KEYS */; -/*!40000 ALTER TABLE `uptime` ENABLE KEYS */; -UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/sql/realmd.sql b/sql/realmd.sql index 4d08c776a..ee8e023f1 100644 --- a/sql/realmd.sql +++ b/sql/realmd.sql @@ -21,7 +21,7 @@ DROP TABLE IF EXISTS `realmd_db_version`; CREATE TABLE `realmd_db_version` ( - `required_6976_01_realmd_realmd_db_version` bit(1) default NULL + `required_7546_02_realmd_uptime` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; -- @@ -174,6 +174,29 @@ INSERT INTO `realmlist` VALUES (1,'MaNGOS','127.0.0.1',8085,1,0,1,0,0); /*!40000 ALTER TABLE `realmlist` ENABLE KEYS */; UNLOCK TABLES; + +-- +-- Table structure for table `uptime` +-- + +DROP TABLE IF EXISTS `uptime`; +CREATE TABLE `uptime` ( + `realmid` int(11) unsigned NOT NULL, + `starttime` bigint(20) unsigned NOT NULL default '0', + `startstring` varchar(64) NOT NULL default '', + `uptime` bigint(20) unsigned NOT NULL default '0', + `maxplayers` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`realmid`,`starttime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; + +-- +-- Dumping data for table `uptime` +-- + +LOCK TABLES `uptime` WRITE; +/*!40000 ALTER TABLE `uptime` DISABLE KEYS */; +/*!40000 ALTER TABLE `uptime` ENABLE KEYS */; +UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/sql/updates/7546_01_characters_uptime.sql b/sql/updates/7546_01_characters_uptime.sql new file mode 100644 index 000000000..51d7c4ccf --- /dev/null +++ b/sql/updates/7546_01_characters_uptime.sql @@ -0,0 +1,3 @@ +ALTER TABLE character_db_version CHANGE COLUMN required_7544_02_characters_uptime required_7546_01_characters_uptime bit; + +DROP TABLE IF EXISTS `uptime`; \ No newline at end of file diff --git a/sql/updates/7546_02_realmd_uptime.sql b/sql/updates/7546_02_realmd_uptime.sql new file mode 100644 index 000000000..a53b0f95f --- /dev/null +++ b/sql/updates/7546_02_realmd_uptime.sql @@ -0,0 +1,16 @@ +ALTER TABLE realmd_db_version CHANGE COLUMN required_6976_01_realmd_realmd_db_version required_7546_02_realmd_uptime bit; + + +-- +-- Table structure for table `uptime` +-- + +DROP TABLE IF EXISTS `uptime`; +CREATE TABLE `uptime` ( + `realmid` int(11) unsigned NOT NULL, + `starttime` bigint(20) unsigned NOT NULL default '0', + `startstring` varchar(64) NOT NULL default '', + `uptime` bigint(20) unsigned NOT NULL default '0', + `maxplayers` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`realmid`,`starttime`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index aeed1e308..af1ec8f82 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -204,6 +204,8 @@ pkgdata_DATA = \ 7536_01_mangos_spell_chain.sql \ 7544_01_mangos_uptime.sql \ 7544_02_characters_uptime.sql \ + 7546_01_characters_uptime.sql \ + 7546_02_realmd_uptime.sql \ README ## Additional files to include when running 'make dist' @@ -388,4 +390,6 @@ EXTRA_DIST = \ 7536_01_mangos_spell_chain.sql \ 7544_01_mangos_uptime.sql \ 7544_02_characters_uptime.sql \ + 7546_01_characters_uptime.sql \ + 7546_02_realmd_uptime.sql \ README diff --git a/src/game/World.cpp b/src/game/World.cpp index 6382d02b9..0045e79d1 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1365,8 +1365,8 @@ void World::SetInitialWorldSettings() sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d", local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec); - loginDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)", - isoDate, uint64(m_startTime)); + loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " I64FMTD ", '%s', 0)", + realmID, uint64(m_startTime), isoDate); m_timers[WUPDATE_OBJECTS].SetInterval(0); m_timers[WUPDATE_SESSIONS].SetInterval(0); @@ -1535,7 +1535,7 @@ void World::Update(uint32 diff) uint32 maxClientsNum = GetMaxActiveSessionCount(); m_timers[WUPDATE_UPTIME].Reset(); - loginDatabase.PExecute("UPDATE uptime SET uptime = %d, maxplayers = %d WHERE starttime = " I64FMTD, tmpDiff, maxClientsNum, uint64(m_startTime)); + loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " I64FMTD, tmpDiff, maxClientsNum, realmID, uint64(m_startTime)); } ///
  • Handle all other objects diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a102f831d..667d32207 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7545" + #define REVISION_NR "7546" #endif // __REVISION_NR_H__ From 18ec7c8011094b02c445540aefda0b6ccff03787 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 26 Mar 2009 20:33:09 +0300 Subject: [PATCH 05/10] [7547] Improvments in reputation achievements implememtaion. * Speedup achievement checks at reputation updates. * Implement - ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION - ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION - ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS --- src/game/AchievementMgr.cpp | 28 +++++++++++------------ src/game/ReputationMgr.cpp | 44 ++++++++++++++++++++++++++++++++++++- src/game/ReputationMgr.h | 12 +++++++++- src/shared/revision_nr.h | 2 +- 4 files changed, 68 insertions(+), 18 deletions(-) diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index 3e570fcb1..efe3ada1d 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -762,18 +762,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui } case ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION: { - // skip faction check only at loading - if (miscvalue1 && GetPlayer()->GetReputationRank(miscvalue1) < REP_EXALTED) - continue; - - uint32 counter = 0; - FactionStateList const& factionStateList = GetPlayer()->GetReputationMgr().GetStateList(); - for (FactionStateList::const_iterator iter = factionStateList.begin(); iter!= factionStateList.end(); ++iter) - if(FactionEntry const *factionEntry = sFactionStore.LookupEntry(iter->second.ID)) - if(ReputationMgr::ReputationToRank(iter->second.Standing + GetPlayer()->GetReputationMgr().GetBaseReputation(factionEntry)) >= REP_EXALTED) - ++counter; - - SetCriteriaProgress(achievementCriteria, counter); + SetCriteriaProgress(achievementCriteria, GetPlayer()->GetReputationMgr().GetExaltedFactionCount()); break; } case ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP: @@ -866,6 +855,15 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui SetCriteriaProgress(achievementCriteria, spellCount); break; } + case ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION: + SetCriteriaProgress(achievementCriteria, GetPlayer()->GetReputationMgr().GetReveredFactionCount()); + break; + case ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION: + SetCriteriaProgress(achievementCriteria, GetPlayer()->GetReputationMgr().GetHonoredFactionCount()); + break; + case ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS: + SetCriteriaProgress(achievementCriteria, GetPlayer()->GetReputationMgr().GetVisibleFactionCount()); + break; case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2: { if (!miscvalue1 || miscvalue1 != achievementCriteria->cast_spell.spellID) @@ -930,9 +928,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui case ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION: case ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_GOLD_VALUE_OWNED: - case ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION: - case ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION: - case ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS: case ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM: case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED: @@ -1067,6 +1062,9 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve case ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD: + case ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION: + case ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION: + case ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_ARMOR: diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 354389279..0ff702010 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -198,6 +198,10 @@ void ReputationMgr::SendVisible(FactionState const* faction) const void ReputationMgr::Initilize() { m_factions.clear(); + m_visibleFactionCount = 0; + m_honoredFactionCount = 0; + m_reveredFactionCount = 0; + m_exaltedFactionCount = 0; for(unsigned int i = 1; i < sFactionStore.GetNumRows(); i++) { @@ -212,6 +216,11 @@ void ReputationMgr::Initilize() newFaction.Flags = GetDefaultStateFlags(factionEntry); newFaction.Changed = true; + if( newFaction.Flags & FACTION_FLAG_VISIBLE ) + ++m_visibleFactionCount; + + UpdateRankCounters(REP_HOSTILE,GetBaseRank(factionEntry)); + m_factions[newFaction.ReputationListID] = newFaction; } } @@ -250,19 +259,27 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in else if (standing < Reputation_Bottom) standing = Reputation_Bottom; + ReputationRank old_rank = ReputationToRank(itr->second.Standing + BaseRep); + ReputationRank new_rank = ReputationToRank(standing); + itr->second.Standing = standing - BaseRep; itr->second.Changed = true; SetVisible(&itr->second); - if(ReputationToRank(standing) <= REP_HOSTILE) + if(new_rank <= REP_HOSTILE) SetAtWar(&itr->second,true); SendState(&itr->second); + UpdateRankCounters(old_rank, new_rank); + m_player->ReputationChanged(factionEntry); + m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS, factionEntry->ID); m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, factionEntry->ID); m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION,factionEntry->ID); + m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION,factionEntry->ID); + m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION,factionEntry->ID); return true; } @@ -303,6 +320,8 @@ void ReputationMgr::SetVisible(FactionState* faction) faction->Flags |= FACTION_FLAG_VISIBLE; faction->Changed = true; + ++m_visibleFactionCount; + SendVisible(faction); } @@ -385,6 +404,12 @@ void ReputationMgr::LoadFromDB(QueryResult *result) // update standing to current faction->Standing = int32(fields[1].GetUInt32()); + // update counters + int32 BaseRep = GetBaseReputation(factionEntry); + ReputationRank old_rank = ReputationToRank(BaseRep); + ReputationRank new_rank = ReputationToRank(BaseRep + faction->Standing); + UpdateRankCounters(old_rank,new_rank); + uint32 dbFactionFlags = fields[2].GetUInt32(); if( dbFactionFlags & FACTION_FLAG_VISIBLE ) @@ -431,3 +456,20 @@ void ReputationMgr::SaveToDB() } CharacterDatabase.CommitTransaction(); } + +void ReputationMgr::UpdateRankCounters( ReputationRank old_rank, ReputationRank new_rank ) +{ + if(old_rank >= REP_EXALTED) + --m_exaltedFactionCount; + if(old_rank >= REP_REVERED) + --m_reveredFactionCount; + if(old_rank >= REP_HONORED) + --m_honoredFactionCount; + + if(new_rank >= REP_EXALTED) + ++m_exaltedFactionCount; + if(new_rank >= REP_REVERED) + ++m_reveredFactionCount; + if(new_rank >= REP_HONORED) + ++m_honoredFactionCount; +} \ No newline at end of file diff --git a/src/game/ReputationMgr.h b/src/game/ReputationMgr.h index 99a1361ab..cb4c85fd5 100644 --- a/src/game/ReputationMgr.h +++ b/src/game/ReputationMgr.h @@ -56,7 +56,8 @@ class QueryResult; class ReputationMgr { public: // constructors and global modifiers - explicit ReputationMgr(Player* owner) : m_player(owner) {} + explicit ReputationMgr(Player* owner) : m_player(owner), + m_visibleFactionCount(0), m_honoredFactionCount(0), m_reveredFactionCount(0), m_exaltedFactionCount(0) {} ~ReputationMgr() {} void SaveToDB(); @@ -68,6 +69,11 @@ class ReputationMgr static ReputationRank ReputationToRank(int32 standing); public: // accessors + uint8 GetVisibleFactionCount() const { return m_visibleFactionCount; } + uint8 GetHonoredFactionCount() const { return m_honoredFactionCount; } + uint8 GetReveredFactionCount() const { return m_reveredFactionCount; } + uint8 GetExaltedFactionCount() const { return m_exaltedFactionCount; } + FactionStateList const& GetStateList() const { return m_factions; } FactionState const* GetState(FactionEntry const* factionEntry) const @@ -131,6 +137,10 @@ class ReputationMgr Player* m_player; FactionStateList m_factions; ForcedReactions m_forcedReactions; + uint8 m_visibleFactionCount :8; + uint8 m_honoredFactionCount :8; + uint8 m_reveredFactionCount :8; + uint8 m_exaltedFactionCount :8; }; #endif diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 667d32207..00681e776 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7546" + #define REVISION_NR "7547" #endif // __REVISION_NR_H__ From bfe25d510b64e67911249fa69d2611038c0376ba Mon Sep 17 00:00:00 2001 From: arrai Date: Thu, 26 Mar 2009 20:46:12 +0100 Subject: [PATCH 06/10] [7548] Fixed some commands by replacing !args with !*args check --- src/game/Level2.cpp | 2 +- src/game/Level3.cpp | 18 +++++++++--------- src/shared/revision_nr.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index d3a9fcb71..f49b586e7 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -2072,7 +2072,7 @@ bool ChatHandler::HandleModifyMorphCommand(const char* args) //kick player bool ChatHandler::HandleKickPlayerCommand(const char *args) { - if (!args) + if (!*args) { Player* player = getSelectedPlayer(); diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index df24f4eec..b8395c3be 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -3556,7 +3556,7 @@ bool ChatHandler::HandleNpcAllowMovementCommand(const char* /*args*/) bool ChatHandler::HandleNpcChangeEntryCommand(const char *args) { - if(!args) + if (!*args) return false; uint32 newEntryNum = atoi(args); @@ -5047,7 +5047,7 @@ bool ChatHandler::HandleBanIPCommand(const char* args) bool ChatHandler::HandleBanHelper(BanMode mode, const char* args) { - if(!args) + if (!*args) return false; char* cnameOrIP = strtok ((char*)args, " "); @@ -5135,7 +5135,7 @@ bool ChatHandler::HandleUnBanIPCommand(const char* args) bool ChatHandler::HandleUnBanHelper(BanMode mode, const char* args) { - if(!args) + if (!*args) return false; char* cnameOrIP = strtok ((char*)args, " "); @@ -5178,7 +5178,7 @@ bool ChatHandler::HandleUnBanHelper(BanMode mode, const char* args) bool ChatHandler::HandleBanInfoAccountCommand(const char* args) { - if(!args) + if (!*args) return false; char* cname = strtok((char*)args, ""); @@ -5205,7 +5205,7 @@ bool ChatHandler::HandleBanInfoAccountCommand(const char* args) bool ChatHandler::HandleBanInfoCharacterCommand(const char* args) { - if(!args) + if (!*args) return false; std::string name = extractPlayerNameFromLink((char*)args); @@ -5264,7 +5264,7 @@ bool ChatHandler::HandleBanInfoHelper(uint32 accountid, char const* accountname) bool ChatHandler::HandleBanInfoIPCommand(const char* args) { - if(!args) + if (!*args) return false; char* cIP = strtok ((char*)args, ""); @@ -5533,7 +5533,7 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/) bool ChatHandler::HandleGMFlyModeCommand(const char* args) { - if(!args) + if (!*args) return false; Player *target = getSelectedPlayer(); @@ -5559,7 +5559,7 @@ bool ChatHandler::HandleGMFlyModeCommand(const char* args) bool ChatHandler::HandlePDumpLoadCommand(const char *args) { - if(!args) + if (!*args) return false; char * file = strtok((char*)args, " "); @@ -5670,7 +5670,7 @@ bool ChatHandler::HandlePDumpLoadCommand(const char *args) bool ChatHandler::HandlePDumpWriteCommand(const char *args) { - if(!args) + if (!*args) return false; char* file = strtok((char*)args, " "); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 00681e776..bfa6fa163 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7547" + #define REVISION_NR "7548" #endif // __REVISION_NR_H__ From 004fa105e734f6c24c7da381ed9e580c52525dff Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sun, 27 Apr 2008 00:15:58 +0400 Subject: [PATCH 07/10] [7549] Remove call CheckExploreSystem() from Player::Update (alredy do it in Player::SetPosition) Signed-off-by: DiSlord --- src/game/Player.cpp | 2 -- src/shared/revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ac82c94b6..d25c11b72 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1102,8 +1102,6 @@ void Player::Update( uint32 p_time ) UpdateAfkReport(now); - CheckExploreSystem(); - // Update items that have just a limited lifetime if (now>m_Last_tick) UpdateItemDuration(uint32(now- m_Last_tick)); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bfa6fa163..812f43a65 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7548" + #define REVISION_NR "7549" #endif // __REVISION_NR_H__ From bf5ba338d9c7c43e58171f1c83ba46cc57df4ccf Mon Sep 17 00:00:00 2001 From: DiSlord Date: Sun, 27 Apr 2008 00:26:05 +0400 Subject: [PATCH 08/10] [7550] Remove dublicate init in Player::Player Signed-off-by: DiSlord --- src/game/Player.cpp | 2 -- src/shared/revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d25c11b72..bfc356f67 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -347,8 +347,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa m_DailyQuestChanged = false; m_lastDailyQuestTime = 0; - m_regenTimer = 0; - m_weaponChangeTimer = 0; for (int i=0; i Date: Thu, 26 Mar 2009 23:16:15 +0100 Subject: [PATCH 09/10] [7551] apply deserter debuff also if player leaves the bg in preparation phase prior this deserter debuff was only applied at status_in_progress --- src/game/Player.cpp | 9 +++++---- src/shared/revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index bfc356f67..aadf62113 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17504,13 +17504,14 @@ void Player::LeaveBattleground(bool teleportToEntryPoint) { if(BattleGround *bg = GetBattleGround()) { - bool need_debuf = bg->isBattleGround() && (bg->GetStatus() == STATUS_IN_PROGRESS) && sWorld.getConfig(CONFIG_BATTLEGROUND_CAST_DESERTER); - bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true); // call after remove to be sure that player resurrected for correct cast - if(need_debuf) - CastSpell(this, 26013, true); // Deserter + if( bg->isBattleGround() && sWorld.getConfig(CONFIG_BATTLEGROUND_CAST_DESERTER) ) + { + if( bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN ) + CastSpell(this, 26013, true); // Deserter + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 01a740f20..429126562 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7550" + #define REVISION_NR "7551" #endif // __REVISION_NR_H__ From c4d4bb5620534485563c86815be8813ae50a2d3a Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 26 Mar 2009 23:35:28 +0300 Subject: [PATCH 10/10] [7552] Move client version dependend DBC code to src/game. --- src/game/AchievementMgr.cpp | 2 +- src/game/AchievementMgr.h | 4 +- src/game/AuctionHouseMgr.cpp | 2 +- src/{shared/Database => game}/DBCEnums.h | 0 src/{shared/Database => game}/DBCStores.cpp | 5 +- src/{shared/Database => game}/DBCStores.h | 78 +-------------- src/{shared/Database => game}/DBCStructure.h | 4 +- .../Database/DBCfmt.cpp => game/DBCfmt.h} | 5 + src/game/HostilRefManager.cpp | 2 +- src/game/Mail.cpp | 2 +- src/game/Makefile.am | 5 + src/game/Map.h | 2 +- src/game/PetAI.cpp | 2 +- src/game/ReputationMgr.cpp | 2 +- src/game/ReputationMgr.h | 2 +- src/game/SpellHandler.cpp | 2 +- src/game/SpellMgr.cpp | 2 +- src/game/SpellMgr.h | 2 +- src/game/TotemAI.cpp | 2 +- src/game/Transports.cpp | 2 +- src/game/Unit.h | 2 +- src/game/World.cpp | 2 +- .../{dbcfile.cpp => DBCFileLoader.cpp} | 16 ++-- .../Database/{dbcfile.h => DBCFileLoader.h} | 16 ++-- src/shared/Database/DBCStore.h | 94 +++++++++++++++++++ src/shared/Database/DatabaseEnv.h | 1 - src/shared/Database/Makefile.am | 11 +-- src/shared/Database/SQLStorageImpl.h | 2 +- src/shared/revision_nr.h | 2 +- win/VC71/game.vcproj | 15 +++ win/VC71/shared.vcproj | 30 +----- win/VC80/game.vcproj | 20 ++++ win/VC80/shared.vcproj | 54 +---------- win/VC90/game.vcproj | 20 ++++ win/VC90/shared.vcproj | 54 +---------- 35 files changed, 214 insertions(+), 252 deletions(-) rename src/{shared/Database => game}/DBCEnums.h (100%) rename src/{shared/Database => game}/DBCStores.cpp (99%) rename src/{shared/Database => game}/DBCStores.h (79%) rename src/{shared/Database => game}/DBCStructure.h (99%) rename src/{shared/Database/DBCfmt.cpp => game/DBCfmt.h} (99%) rename src/shared/Database/{dbcfile.cpp => DBCFileLoader.cpp} (93%) rename src/shared/Database/{dbcfile.h => DBCFileLoader.h} (92%) create mode 100644 src/shared/Database/DBCStore.h diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index efe3ada1d..4efed7c97 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -20,7 +20,7 @@ #include "Common.h" #include "Player.h" #include "WorldPacket.h" -#include "Database/DBCEnums.h" +#include "DBCEnums.h" #include "GameEventMgr.h" #include "ObjectMgr.h" #include "Guild.h" diff --git a/src/game/AchievementMgr.h b/src/game/AchievementMgr.h index af637bcc2..d355023d6 100644 --- a/src/game/AchievementMgr.h +++ b/src/game/AchievementMgr.h @@ -20,9 +20,9 @@ #include "Common.h" #include "Policies/Singleton.h" -#include "Database/DBCEnums.h" -#include "Database/DBCStores.h" #include "Database/DatabaseEnv.h" +#include "DBCEnums.h" +#include "DBCStores.h" #include #include diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index 84457c570..8a2f838ba 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -18,8 +18,8 @@ #include "Common.h" #include "Database/DatabaseEnv.h" -#include "Database/DBCStores.h" #include "Database/SQLStorage.h" +#include "DBCStores.h" #include "ProgressBar.h" #include "AccountMgr.h" diff --git a/src/shared/Database/DBCEnums.h b/src/game/DBCEnums.h similarity index 100% rename from src/shared/Database/DBCEnums.h rename to src/game/DBCEnums.h diff --git a/src/shared/Database/DBCStores.cpp b/src/game/DBCStores.cpp similarity index 99% rename from src/shared/Database/DBCStores.cpp rename to src/game/DBCStores.cpp index 2396aded6..2cf3b00dc 100644 --- a/src/shared/Database/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -17,12 +17,11 @@ */ #include "DBCStores.h" -//#include "DataStore.h" #include "Policies/SingletonImp.h" #include "Log.h" #include "ProgressBar.h" -#include "DBCfmt.cpp" +#include "DBCfmt.h" #include @@ -160,7 +159,7 @@ template inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage& storage, const std::string& dbc_path, const std::string& filename) { // compatibility format and C++ structure sizes - assert(DBCFile::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFile::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename)); + assert(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename)); std::string dbc_filename = dbc_path + filename; if(storage.Load(dbc_filename.c_str())) diff --git a/src/shared/Database/DBCStores.h b/src/game/DBCStores.h similarity index 79% rename from src/shared/Database/DBCStores.h rename to src/game/DBCStores.h index 71f03a6a5..410cfd437 100644 --- a/src/shared/Database/DBCStores.h +++ b/src/game/DBCStores.h @@ -16,12 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef DBCSTORES_H -#define DBCSTORES_H +#ifndef MANGOS_DBCSTORES_H +#define MANGOS_DBCSTORES_H #include "Common.h" -//#include "DataStore.h" -#include "dbcfile.h" +#include "Database/DBCStore.h" #include "DBCStructure.h" #include @@ -59,77 +58,6 @@ uint32 GetTalentInspectBitPosInTab(uint32 talentId); uint32 GetTalentTabInspectBitSize(uint32 talentTabId); uint32 const* /*[3]*/ GetTalentTabPages(uint32 cls); -template -class DBCStorage -{ - typedef std::list StringPoolList; - public: - explicit DBCStorage(const char *f) : nCount(0), fieldCount(0), fmt(f), indexTable(NULL), m_dataTable(NULL) { } - ~DBCStorage() { Clear(); } - - T const* LookupEntry(uint32 id) const { return (id>=nCount)?NULL:indexTable[id]; } - uint32 GetNumRows() const { return nCount; } - char const* GetFormat() const { return fmt; } - uint32 GetFieldCount() const { return fieldCount; } - - bool Load(char const* fn) - { - DBCFile dbc; - // Check if load was sucessful, only then continue - if(!dbc.Load(fn, fmt)) - return false; - - fieldCount = dbc.GetCols(); - m_dataTable = (T*)dbc.AutoProduceData(fmt,nCount,(char**&)indexTable); - m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt,(char*)m_dataTable)); - - // error in dbc file at loading if NULL - return indexTable!=NULL; - } - - bool LoadStringsFrom(char const* fn) - { - // DBC must be already loaded using Load - if(!indexTable) - return false; - - DBCFile dbc; - // Check if load was successful, only then continue - if(!dbc.Load(fn, fmt)) - return false; - - m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt,(char*)m_dataTable)); - - return true; - } - - void Clear() - { - if (!indexTable) - return; - - delete[] ((char*)indexTable); - indexTable = NULL; - delete[] ((char*)m_dataTable); - m_dataTable = NULL; - - while(!m_stringPoolList.empty()) - { - delete[] m_stringPoolList.front(); - m_stringPoolList.pop_front(); - } - nCount = 0; - } - - private: - uint32 nCount; - uint32 fieldCount; - char const* fmt; - T** indexTable; - T* m_dataTable; - StringPoolList m_stringPoolList; -}; - extern DBCStorage sAchievementStore; extern DBCStorage sAchievementCriteriaStore; extern DBCStorage sAreaStore;// recommend access using functions diff --git a/src/shared/Database/DBCStructure.h b/src/game/DBCStructure.h similarity index 99% rename from src/shared/Database/DBCStructure.h rename to src/game/DBCStructure.h index 58c3e5d52..e281472a0 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -16,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef DBCSTRUCTURE_H -#define DBCSTRUCTURE_H +#ifndef MANGOS_DBCSTRUCTURE_H +#define MANGOS_DBCSTRUCTURE_H #include "DBCEnums.h" #include "Platform/Define.h" diff --git a/src/shared/Database/DBCfmt.cpp b/src/game/DBCfmt.h similarity index 99% rename from src/shared/Database/DBCfmt.cpp rename to src/game/DBCfmt.h index c46e8614d..8185f83d2 100644 --- a/src/shared/Database/DBCfmt.cpp +++ b/src/game/DBCfmt.h @@ -16,6 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef MANGOS_DBCSFRM_H +#define MANGOS_DBCSFRM_H + const char Achievementfmt[]="niixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxxi"; const char AchievementCriteriafmt[]="niiiiiiiixxxxxxxxxxxxxxxxxiixix"; const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxxx"; @@ -97,3 +100,5 @@ const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii const char WorldMapAreaEntryfmt[]="xinxffffix"; const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx"; const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxxx"; + +#endif \ No newline at end of file diff --git a/src/game/HostilRefManager.cpp b/src/game/HostilRefManager.cpp index 149f91494..5b1f83787 100644 --- a/src/game/HostilRefManager.cpp +++ b/src/game/HostilRefManager.cpp @@ -19,7 +19,7 @@ #include "HostilRefManager.h" #include "ThreatManager.h" #include "Unit.h" -#include "Database/DBCStructure.h" +#include "DBCStructure.h" #include "SpellMgr.h" HostilRefManager::~HostilRefManager() diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index 912ead72c..78043d900 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -27,7 +27,7 @@ #include "UpdateMask.h" #include "Unit.h" #include "Language.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" void MailItem::deleteItem( bool inDB ) { diff --git a/src/game/Makefile.am b/src/game/Makefile.am index 5ad352163..ca21eab63 100644 --- a/src/game/Makefile.am +++ b/src/game/Makefile.am @@ -97,6 +97,11 @@ libmangosgame_a_SOURCES = \ CreatureAISelector.h \ Creature.cpp \ Creature.h \ + DBCEnums.h \ + DBCfmt.h \ + DBCStores.cpp \ + DBCStores.h \ + DBCStructure.h \ debugcmds.cpp \ DestinationHolder.cpp \ DestinationHolder.h \ diff --git a/src/game/Map.h b/src/game/Map.h index ca027b8ec..e0739c423 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -24,7 +24,7 @@ #include "zthread/Lockable.h" #include "zthread/Mutex.h" #include "zthread/FairReadWriteLock.h" -#include "Database/DBCStructure.h" +#include "DBCStructure.h" #include "GridDefines.h" #include "Cell.h" #include "Object.h" diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index 424af420e..4d2734c5a 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -20,7 +20,7 @@ #include "Errors.h" #include "Pet.h" #include "Player.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "Spell.h" #include "ObjectAccessor.h" #include "SpellMgr.h" diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 0ff702010..15854fef9 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -17,7 +17,7 @@ */ #include "ReputationMgr.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "Player.h" #include "WorldPacket.h" diff --git a/src/game/ReputationMgr.h b/src/game/ReputationMgr.h index cb4c85fd5..b81634119 100644 --- a/src/game/ReputationMgr.h +++ b/src/game/ReputationMgr.h @@ -21,7 +21,7 @@ #include "Common.h" #include "SharedDefines.h" -#include "Database/DBCStructure.h" +#include "DBCStructure.h" #include enum FactionFlags diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 46b861b69..19b7d2b99 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -17,7 +17,7 @@ */ #include "Common.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "WorldPacket.h" #include "WorldSession.h" #include "ObjectMgr.h" diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 875459fc0..7ef35a593 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -20,7 +20,7 @@ #include "ObjectMgr.h" #include "SpellAuraDefines.h" #include "ProgressBar.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "World.h" #include "Chat.h" #include "Spell.h" diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 5e068887e..d026ccb36 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -23,7 +23,7 @@ // For more high level function for sSpellStore data #include "SharedDefines.h" -#include "Database/DBCStructure.h" +#include "DBCStructure.h" #include "Database/SQLStorage.h" #include "Utilities/UnorderedMap.h" diff --git a/src/game/TotemAI.cpp b/src/game/TotemAI.cpp index b91020a23..f10d75039 100644 --- a/src/game/TotemAI.cpp +++ b/src/game/TotemAI.cpp @@ -19,7 +19,7 @@ #include "TotemAI.h" #include "Totem.h" #include "Creature.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "ObjectAccessor.h" #include "SpellMgr.h" diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index 0cd3b70cf..a2454a23f 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -24,7 +24,7 @@ #include "Path.h" #include "WorldPacket.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "ProgressBar.h" void MapManager::LoadTransports() diff --git a/src/game/Unit.h b/src/game/Unit.h index 3b6013701..0c618a4d9 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -31,7 +31,7 @@ #include "FollowerRefManager.h" #include "Utilities/EventProcessor.h" #include "MotionMaster.h" -#include "Database/DBCStructure.h" +#include "DBCStructure.h" #include enum SpellInterruptFlags diff --git a/src/game/World.cpp b/src/game/World.cpp index 0045e79d1..6694d430f 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -40,7 +40,7 @@ #include "ObjectMgr.h" #include "SpellMgr.h" #include "Chat.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "LootMgr.h" #include "ItemEnchantmentMgr.h" #include "MapManager.h" diff --git a/src/shared/Database/dbcfile.cpp b/src/shared/Database/DBCFileLoader.cpp similarity index 93% rename from src/shared/Database/dbcfile.cpp rename to src/shared/Database/DBCFileLoader.cpp index 519e77de7..719138aff 100644 --- a/src/shared/Database/dbcfile.cpp +++ b/src/shared/Database/DBCFileLoader.cpp @@ -20,15 +20,15 @@ #include #include -#include "dbcfile.h" +#include "DBCFileLoader.h" -DBCFile::DBCFile() +DBCFileLoader::DBCFileLoader() { data = NULL; fieldsOffset = NULL; } -bool DBCFile::Load(const char *filename, const char *fmt) +bool DBCFileLoader::Load(const char *filename, const char *fmt) { uint32 header; @@ -89,7 +89,7 @@ bool DBCFile::Load(const char *filename, const char *fmt) return true; } -DBCFile::~DBCFile() +DBCFileLoader::~DBCFileLoader() { if(data) delete [] data; @@ -97,13 +97,13 @@ DBCFile::~DBCFile() delete [] fieldsOffset; } -DBCFile::Record DBCFile::getRecord(size_t id) +DBCFileLoader::Record DBCFileLoader::getRecord(size_t id) { assert(data); return Record(*this, data + id*recordSize); } -uint32 DBCFile::GetFormatRecordSize(const char * format,int32* index_pos) +uint32 DBCFileLoader::GetFormatRecordSize(const char * format,int32* index_pos) { uint32 recordsize = 0; int32 i = -1; @@ -135,7 +135,7 @@ uint32 DBCFile::GetFormatRecordSize(const char * format,int32* index_pos) return recordsize; } -char* DBCFile::AutoProduceData(const char* format, uint32& records, char**& indexTable) +char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**& indexTable) { /* format STRING, NA, FLOAT,NA,INT <=> @@ -218,7 +218,7 @@ char* DBCFile::AutoProduceData(const char* format, uint32& records, char**& inde return dataTable; } -char* DBCFile::AutoProduceStrings(const char* format, char* dataTable) +char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable) { if(strlen(format)!=fieldCount) return NULL; diff --git a/src/shared/Database/dbcfile.h b/src/shared/Database/DBCFileLoader.h similarity index 92% rename from src/shared/Database/dbcfile.h rename to src/shared/Database/DBCFileLoader.h index 74e6b6f3f..13562148d 100644 --- a/src/shared/Database/dbcfile.h +++ b/src/shared/Database/DBCFileLoader.h @@ -16,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef DBCFILE_H -#define DBCFILE_H +#ifndef DBC_FILE_LOADER_H +#define DBC_FILE_LOADER_H #include "Platform/Define.h" #include "Utilities/ByteConverter.h" #include @@ -35,11 +35,11 @@ enum FT_LOGIC='l' //Logical (boolean) }; -class DBCFile +class DBCFileLoader { public: - DBCFile(); - ~DBCFile(); + DBCFileLoader(); + ~DBCFileLoader(); bool Load(const char *filename, const char *fmt); @@ -75,11 +75,11 @@ class DBCFile } private: - Record(DBCFile &file_, unsigned char *offset_): offset(offset_), file(file_) {} + Record(DBCFileLoader &file_, unsigned char *offset_): offset(offset_), file(file_) {} unsigned char *offset; - DBCFile &file; + DBCFileLoader &file; - friend class DBCFile; + friend class DBCFileLoader; }; diff --git a/src/shared/Database/DBCStore.h b/src/shared/Database/DBCStore.h new file mode 100644 index 000000000..523d5c5a0 --- /dev/null +++ b/src/shared/Database/DBCStore.h @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2005-2009 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DBCSTORE_H +#define DBCSTORE_H + +#include "DBCFileLoader.h" + +template +class DBCStorage +{ + typedef std::list StringPoolList; + public: + explicit DBCStorage(const char *f) : nCount(0), fieldCount(0), fmt(f), indexTable(NULL), m_dataTable(NULL) { } + ~DBCStorage() { Clear(); } + + T const* LookupEntry(uint32 id) const { return (id>=nCount)?NULL:indexTable[id]; } + uint32 GetNumRows() const { return nCount; } + char const* GetFormat() const { return fmt; } + uint32 GetFieldCount() const { return fieldCount; } + + bool Load(char const* fn) + { + DBCFileLoader dbc; + // Check if load was sucessful, only then continue + if(!dbc.Load(fn, fmt)) + return false; + + fieldCount = dbc.GetCols(); + m_dataTable = (T*)dbc.AutoProduceData(fmt,nCount,(char**&)indexTable); + m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt,(char*)m_dataTable)); + + // error in dbc file at loading if NULL + return indexTable!=NULL; + } + + bool LoadStringsFrom(char const* fn) + { + // DBC must be already loaded using Load + if(!indexTable) + return false; + + DBCFileLoader dbc; + // Check if load was successful, only then continue + if(!dbc.Load(fn, fmt)) + return false; + + m_stringPoolList.push_back(dbc.AutoProduceStrings(fmt,(char*)m_dataTable)); + + return true; + } + + void Clear() + { + if (!indexTable) + return; + + delete[] ((char*)indexTable); + indexTable = NULL; + delete[] ((char*)m_dataTable); + m_dataTable = NULL; + + while(!m_stringPoolList.empty()) + { + delete[] m_stringPoolList.front(); + m_stringPoolList.pop_front(); + } + nCount = 0; + } + + private: + uint32 nCount; + uint32 fieldCount; + char const* fmt; + T** indexTable; + T* m_dataTable; + StringPoolList m_stringPoolList; +}; +#endif diff --git a/src/shared/Database/DatabaseEnv.h b/src/shared/Database/DatabaseEnv.h index a446aee41..e2b6fdc0f 100644 --- a/src/shared/Database/DatabaseEnv.h +++ b/src/shared/Database/DatabaseEnv.h @@ -23,7 +23,6 @@ #include "Log.h" #include "Errors.h" -#include "Database/DBCStores.h" #include "Database/Field.h" #include "Database/QueryResult.h" diff --git a/src/shared/Database/Makefile.am b/src/shared/Database/Makefile.am index f9de9576f..40ee034ce 100644 --- a/src/shared/Database/Makefile.am +++ b/src/shared/Database/Makefile.am @@ -27,10 +27,9 @@ AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(sr noinst_LIBRARIES = libmangosdatabase.a libmangosdatabase_a_SOURCES = \ - DBCStores.cpp \ - DBCStores.h \ - DBCStructure.h \ - DBCfmt.cpp \ + DBCFileLoader.cpp \ + DBCFileLoader.h \ + DBCStore.h \ Database.cpp \ Database.h \ DatabaseEnv.h \ @@ -59,6 +58,4 @@ libmangosdatabase_a_SOURCES = \ SqlDelayThread.cpp \ SqlDelayThread.h \ SqlOperations.cpp \ - SqlOperations.h \ - dbcfile.cpp \ - dbcfile.h + SqlOperations.h diff --git a/src/shared/Database/SQLStorageImpl.h b/src/shared/Database/SQLStorageImpl.h index c65f9a9e2..bfc8c2c21 100644 --- a/src/shared/Database/SQLStorageImpl.h +++ b/src/shared/Database/SQLStorageImpl.h @@ -18,7 +18,7 @@ #include "ProgressBar.h" #include "Log.h" -#include "dbcfile.h" +#include "DBCFileLoader.h" template template diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 429126562..6b2099499 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7551" + #define REVISION_NR "7552" #endif // __REVISION_NR_H__ diff --git a/win/VC71/game.vcproj b/win/VC71/game.vcproj index c9ade4015..d24fd6aa5 100644 --- a/win/VC71/game.vcproj +++ b/win/VC71/game.vcproj @@ -798,6 +798,21 @@ + + + + + + + + + + diff --git a/win/VC71/shared.vcproj b/win/VC71/shared.vcproj index deefd9881..42f8dae99 100644 --- a/win/VC71/shared.vcproj +++ b/win/VC71/shared.vcproj @@ -198,37 +198,13 @@ + RelativePath="..\..\src\shared\Database\DBCFileLoader.cpp"> + RelativePath="..\..\src\shared\Database\DBCFileLoader.h"> - - - - - - - - - - - - - - + RelativePath="..\..\src\shared\Database\DBCStore.h"> diff --git a/win/VC80/game.vcproj b/win/VC80/game.vcproj index f0721a841..0c754fde8 100644 --- a/win/VC80/game.vcproj +++ b/win/VC80/game.vcproj @@ -1238,6 +1238,26 @@ + + + + + + + + + + diff --git a/win/VC80/shared.vcproj b/win/VC80/shared.vcproj index 12de20388..959360f01 100644 --- a/win/VC80/shared.vcproj +++ b/win/VC80/shared.vcproj @@ -440,63 +440,15 @@ Name="DataStores" > - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj index 2ba06dc11..a3879fbdb 100644 --- a/win/VC90/game.vcproj +++ b/win/VC90/game.vcproj @@ -1240,6 +1240,26 @@ + + + + + + + + + + diff --git a/win/VC90/shared.vcproj b/win/VC90/shared.vcproj index 32931be90..76b1299cd 100644 --- a/win/VC90/shared.vcproj +++ b/win/VC90/shared.vcproj @@ -444,63 +444,15 @@ Name="DataStores" > - - - - - - - - - - - - - - - - - - - -