Jump to content

invliD

Members
  • Posts

    8
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

invliD's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. this has to be added in AchievementMgr.cpp around line 700: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT: return progress->counter >= achievementCriteria->complete_quest_count.totalQuestCount; after this the quest count achievement works...
  2. and you can use one world database for multiple realms...
  3. done. diff --git a/sql/mangos.sql b/sql/mangos.sql index f9a7151..e90c91b 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -16833,28 +16833,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/realmd.sql b/sql/realmd.sql index 4d08c77..58c93ca 100644 --- a/sql/realmd.sql +++ b/sql/realmd.sql @@ -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 (`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 */; @@ -184,4 +207,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2008-01-10 11:37:06 +-- Dump completed on 2008-01-10 11:37:06 \\ No newline at end of file diff --git a/sql/updates/6979_01_mangos_uptime.sql b/sql/updates/6979_01_mangos_uptime.sql new file mode 100644 index 0000000..80e7f09 --- /dev/null +++ b/sql/updates/6979_01_mangos_uptime.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS `uptime`; diff --git a/sql/updates/6979_02_realmd_uptime.sql b/sql/updates/6979_02_realmd_uptime.sql new file mode 100644 index 0000000..605153f --- /dev/null +++ b/sql/updates/6979_02_characters_uptime.sql @@ -0,0 +1,8 @@ +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/src/game/World.cpp b/src/game/World.cpp index c4771d9..0b6c525 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1307,8 +1307,9 @@ 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)", - isoDate, uint64(m_startTime)); + loginDatabase.PExecute("INSERT INTO uptime (realmid, startstring, starttime, " + "uptime) VALUES(%u, '%s', " I64FMTD ", 0)", realmID, + isoDate, uint64(m_startTime)); m_timers[WUPDATE_OBJECTS].SetInterval(0); m_timers[WUPDATE_SESSIONS].SetInterval(0); @@ -1518,7 +1519,9 @@ void World::Update(time_t diff) uint32 maxClientsNum = sWorld.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 " AND realmid = %u", + tmpDiff, maxClientsNum, uint64(m_startTime), realmID); } /// [*] Handle all other objects diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 328f7d8..d32f026 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 "6978" + #define REVISION_NR "6979" #endif // __REVISION_NR_H__
  4. server-related stuff has nothing to do with the world database, so it shouldn't reside in there... here's a patch for moving it into realm-database EDIT: look at post #4 for updated patch
  5. well, I already complied with 1, 3 and 4... but if I can't push to the original project how can all the others?
  6. I'm feeling like a noob because I just don't get it-.- how to do commits? I already understood how to do them locally.. "git add" the files, then "git commit" but when I try "git push" or "git push origin master", there's just an error... I'm able to connect to [email protected] via ssh -v, so my pub key works, but git doesn't.. any ideas? I'm using vista ultimate x86...
  7. I don't get how to commit to git.. so I write here: in line 16599 in src/game/Player.cpp there is a bug... the line should look like this: void Player::LeaveAllArenaTeams(uint64 guid) (class name was missing)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use