Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/Accounts/RBAC.h
	src/server/game/Battlegrounds/ArenaTeam.cpp
This commit is contained in:
Vincent-Michael committed 2013-09-11 22:35:45 +02:00
commit 974bf5c427
26 files changed
+222 -187

No files matched your search

+68 -31
View File
@@ -112,11 +112,12 @@ LOCK TABLES `account_banned` WRITE;
UNLOCK TABLES;
--
-- Dumping data for table `autobroadcast`
-- Table structure for table `autobroadcast`
--
DROP TABLE IF EXISTS `autobroadcast`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `autobroadcast` (
`realmid` int(11) NOT NULL DEFAULT '-1',
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
@@ -124,6 +125,68 @@ CREATE TABLE `autobroadcast` (
`text` longtext NOT NULL,
PRIMARY KEY (`id`,`realmid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `autobroadcast`
--
LOCK TABLES `autobroadcast` WRITE;
/*!40000 ALTER TABLE `autobroadcast` DISABLE KEYS */;
/*!40000 ALTER TABLE `autobroadcast` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ip2nation`
--
DROP TABLE IF EXISTS `ip2nation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ip2nation` (
`ip` int(11) unsigned NOT NULL DEFAULT '0',
`country` char(2) NOT NULL DEFAULT '',
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ip2nation`
--
LOCK TABLES `ip2nation` WRITE;
/*!40000 ALTER TABLE `ip2nation` DISABLE KEYS */;
/*!40000 ALTER TABLE `ip2nation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ip2nationCountries`
--
DROP TABLE IF EXISTS `ip2nationCountries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ip2nationCountries` (
`code` varchar(4) NOT NULL DEFAULT '',
`iso_code_2` varchar(2) NOT NULL DEFAULT '',
`iso_code_3` varchar(3) DEFAULT '',
`iso_country` varchar(255) NOT NULL DEFAULT '',
`country` varchar(255) NOT NULL DEFAULT '',
`lat` float NOT NULL DEFAULT '0',
`lon` float NOT NULL DEFAULT '0',
PRIMARY KEY (`code`),
KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ip2nationCountries`
--
LOCK TABLES `ip2nationCountries` WRITE;
/*!40000 ALTER TABLE `ip2nationCountries` DISABLE KEYS */;
/*!40000 ALTER TABLE `ip2nationCountries` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ip_banned`
@@ -142,32 +205,6 @@ CREATE TABLE `ip_banned` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Banned IPs';
/*!40101 SET character_set_client = @saved_cs_client */;
/*Table structure for table `ip2nation` */
DROP TABLE IF EXISTS `ip2nation`;
CREATE TABLE `ip2nation` (
`ip` int(11) unsigned NOT NULL DEFAULT '0',
`country` char(2) NOT NULL DEFAULT '',
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Table structure for table `ip2nationCountries` */
DROP TABLE IF EXISTS `ip2nationCountries`;
CREATE TABLE `ip2nationCountries` (
`code` varchar(4) NOT NULL DEFAULT '',
`iso_code_2` varchar(2) NOT NULL DEFAULT '',
`iso_code_3` varchar(3) DEFAULT '',
`iso_country` varchar(255) NOT NULL DEFAULT '',
`country` varchar(255) NOT NULL DEFAULT '',
`lat` float NOT NULL DEFAULT '0',
`lon` float NOT NULL DEFAULT '0',
PRIMARY KEY (`code`),
KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `ip_banned`
--
@@ -356,7 +393,7 @@ CREATE TABLE `rbac_permissions` (
LOCK TABLES `rbac_permissions` WRITE;
/*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */;
INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(7,'Player Commands (Temporal till commands moved to rbac)'),(8,'Moderator Commands (Temporal till commands moved to rbac)'),(9,'GameMaster Commands (Temporal till commands moved to rbac)'),(10,'Administrator Commands (Temporal till commands moved to rbac)'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account');
INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(200,'Command: .rbac'),(201,'Command: .rbac account'),(202,'Command: .rbac account group'),(203,'Command: .rbac account group add'),(204,'Command: .rbac account group remove'),(205,'Command: .rbac account role'),(206,'Command: .rbac account role grant'),(207,'Command: .rbac account role deny'),(208,'Command: .rbac account role revoke'),(209,'Command: .rbac account permission'),(210,'Command: .rbac account permission grant'),(211,'Command: .rbac account permission deny'),(212,'Command: .rbac account permission revoke'),(213,'Command: .rbac list'),(214,'Command: .rbac list groups'),(215,'Command: .rbac list roles'),(216,'Command: .rbac list permissions'),(217,'Command: .account'),(218,'Command: .account addon'),(219,'Command: .account create'),(220,'Command: .account delete'),(221,'Command: .account lock'),(222,'Command: .account lock country'),(223,'Command: .account lock ip'),(224,'Command: .account onlinelist'),(225,'Command: .account password'),(226,'Command: .account set'),(227,'Command: .account set addon'),(228,'Command: .account set gmlevel'),(229,'Command: .account set password'),(230,'achievement'),(231,'achievement add'),(232,'arena'),(233,'arena captain'),(234,'arena create'),(235,'arena disband'),(236,'arena info'),(237,'arena lookup'),(238,'arena rename'),(239,'ban'),(240,'ban account'),(241,'ban character'),(242,'ban ip'),(243,'ban playeraccount'),(244,'baninfo'),(245,'baninfo account'),(246,'baninfo character'),(247,'baninfo ip'),(248,'banlist'),(249,'banlist account'),(250,'banlist character'),(251,'banlist ip'),(252,'unban'),(253,'unban account'),(254,'unban character'),(255,'unban ip'),(256,'unban playeraccount'),(257,'bf'),(258,'bf start'),(259,'bf stop'),(260,'bf switch'),(261,'bf timer'),(262,'bf enable'),(263,'account email'),(264,'account set sec'),(265,'account set sec email'),(266,'account set sec regmail'),(267,'cast'),(268,'cast back'),(269,'cast dist'),(270,'cast self'),(271,'cast target'),(272,'cast dest'),(273,'character'),(274,'character customize'),(275,'character changefaction'),(276,'character changerace'),(277,'character deleted'),(279,'character deleted list'),(280,'character deleted restore'),(283,'character level'),(284,'character rename'),(285,'character reputation'),(286,'character titles'),(287,'levelup'),(288,'pdump'),(289,'pdump load'),(290,'pdump write'),(291,'cheat'),(292,'cheat casttime'),(293,'cheat cooldown'),(294,'cheat explore'),(295,'cheat god'),(296,'cheat power'),(297,'cheat status'),(298,'cheat taxi'),(299,'cheat waterwalk'),(300,'debug'),(301,'debug anim'),(302,'debug areatriggers'),(303,'debug arena'),(304,'debug bg'),(305,'debug entervehicle'),(306,'debug getitemstate'),(307,'debug getitemvalue'),(308,'debug getvalue'),(309,'debug hostil'),(310,'debug itemexpire'),(311,'debug lootrecipient'),(312,'debug los'),(313,'debug mod32value'),(314,'debug moveflags'),(315,'debug play'),(316,'debug play cinematics'),(317,'debug play movie'),(318,'debug play sound'),(319,'debug send'),(320,'debug send buyerror'),(321,'debug send channelnotify'),(322,'debug send Line truncated
/*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */;
UNLOCK TABLES;
@@ -383,7 +420,7 @@ CREATE TABLE `rbac_role_permissions` (
LOCK TABLES `rbac_role_permissions` WRITE;
/*!40000 ALTER TABLE `rbac_role_permissions` DISABLE KEYS */;
INSERT INTO `rbac_role_permissions` VALUES (5,1),(5,2),(6,3),(6,4),(6,5),(7,6),(1,7),(2,8),(3,9),(4,10),(8,11),(9,13),(33,14),(33,15),(33,16),(33,17),(33,18),(27,19),(22,20),(23,21),(24,22),(17,23),(34,24),(28,25),(30,26),(19,27),(35,28),(36,29),(11,30),(12,31),(10,32),(20,33),(14,34),(37,35),(29,36),(15,37),(13,38),(25,39),(38,40),(26,41),(18,42),(18,43),(16,44),(31,45),(32,46),(21,47),(39,48),(40,49), (41,50);
INSERT INTO `rbac_role_permissions` VALUES (5,1),(5,2),(6,3),(6,4),(6,5),(7,6),(8,11),(9,13),(33,14),(33,15),(33,16),(33,17),(33,18),(27,19),(22,20),(23,21),(24,22),(17,23),(34,24),(28,25),(30,26),(19,27),(35,28),(36,29),(11,30),(12,31),(10,32),(20,33),(14,34),(37,35),(29,36),(15,37),(13,38),(25,39),(38,40),(26,41),(18,42),(18,43),(16,44),(31,45),(32,46),(21,47),(39,48),(40,49),(41,50),(4,200),(4,201),(4,202),(4,203),(4,204),(4,205),(4,206),(4,207),(4,208),(4,209),(4,210),(4,211),(4,212),(4,213),(4,214),(4,215),(4,216),(1,217),(2,218),(1,221),(1,222),(1,223),(1,225),(4,226),(4,227),(4,230),(4,231),(3,232),(4,233),(4,234),(4,235),(3,236),(3,237),(4,238),(4,239),(4,240),(4,241),(4,242),(4,243),(4,244),(4,245),(4,246),(4,247),(4,248),(4,249),(4,250),(4,251),(4,252),(4,253),(4,254),(4,255),(4,256),(4,257),(4,258),(4,259),(4,260),(4,261),(4,262),(1,263),(2,263),(3,263),(4,263),(4,264),(4,265),(4,266),(4,267),(4,268),(4,269),(4,270),(4,271),(4,272),(3,273),(3,274),(3,275),(3,276),(3,277),(4,279),(4,280),(4,283),(3,284),(3,285),(3,286),(4,287),(4,288),(4,289),(4,290),(4,291),(4,292),(4,293),(4,294),(4,295),(4,296),(4,297),(4,298),(4,299),(2,300),(3,301),(4,302),(4,303),(4,304),(4,305),(4,306),(4,307),(4,308),(4,309),(4,310),(3,311),(2,312),(4,313),(4,314),(2,315),(2,316),(2,317),(2,318),(4,319),(4,320),(4,321),(4,322),(4,323),(4,324),(4,325),(4,326),(4,327),(4,328),(4,329),(4,330),(4,331),(4,332),(4,333),(4,334),(4,335),(4,336),(4,337),(4,338),(4,339),(4,340),(4,341),(4,342),(4,343),(4,344),(4,345),(4,346),(4,347),(4,348),(4,349),(4,350),(4,351),(4,352),(4,353),(4,354),(4,355),(4,356),(4,357),(4,358),(4,359),(4,360),(4,361),(4,362),(4,363),(4,364),(4,365),(4,366),(2,367),(2,368),(2,369),(2,370),(2,371),(2,372),(4,373),(2,374),(4,375),(2,376),(2,377),(2,378),(2,379),(2,380),(2,381),(2,382),(2,383),(2,384),(2,385),(2,386),(3,387),(3,388),(3,389),(3,390),(3,391),(3,392),(3,393),(3,394),(3,395),(3,396),(3,397),(3,398),(3,399),(4,401),(4,402),(4,403),(4,404),(4,405),(4,406),(4,407),(2,408),(2,409),(2,410),(2,411),(2,412),(2,413),(2,414),(2,415),(2,416),(4,417),(4,418),(4,419),(4,420),(4,421),(4,422),(4,423),(4,424),(4,425),(4,426),(4,427),(4,428),(4,429),(2,430),(2,431),(2,432),(2,433),(4,434),(4,435),(4,436),(4,437),(4,438),(4,439),(4,440),(4,441),(4,442),(4,443),(4,444),(4,445),(4,446),(4,447),(4,448),(4,449),(4,450),(4,451),(4,452),(4,453),(4,454),(4,455),(4,456),(4,457),(4,458),(4,459),(4,461),(2,462),(4,463),(4,464),(4,465),(2,466),(2,467),(2,468),(2,469),(2,470),(2,471),(4,472),(4,473),(4,474),(4,475),(4,476),(4,477),(4,478),(3,479),(3,480),(3,481),(3,482),(2,483),(2,484),(3,485),(3,486),(3,487),(4,488),(4,489),(2,490),(4,491),(4,492),(4,493),(3,494),(4,495),(1,496),(4,497),(4,498),(4,499),(4,500),(1,501),(4,502),(4,503),(2,504),(4,505),(3,506),(1,507),(4,508),(3,509),(3,510),(4,511),(2,512),(4,513),(4,514),(2,515),(4,516),(3,517),(3,518),(4,519),(2,520),(3,521),(4,522),(4,523),(2,524),(1,525),(4,526),(4,527),(2,528),(4,529),(4,530),(2,531),(2,532),(4,533),(1,534),(4,535),(4,536),(4,537),(4,538),(4,539),(4,540),(4,541),(3,542),(3,543),(2,544),(2,545),(2,546),(2,547),(2,548),(2,549),(3,550),(2,551),(2,552),(2,553),(2,554),(2,555),(4,556),(2,557),(3,558),(2,559),(2,560),(2,561),(2,562),(2,563),(2,564),(2,565),(2,566),(2,567),(3,568),(2,569),(2,570),(3,571),(3,572),(3,573),(3,574),(3,575),(3,576),(3,577),(3,578),(3,579),(3,580),(4,581),(4,582),(3,583),(3,584),(3,585),(3,586),(3,587),(3,588),(3,589),(3,590),(3,591),(4,592),(4,593),(3,594),(3,595),(4,596),(2,597),(2,598),(2,599),(2,600),(3,601),(4,602),(4,603),(4,604),(4,605),(4,606),(4,607),(4,608),(4,609),(4,610),(4,611),(4,612),(4,613),(4,614),(4,615),(4,616),(4,617),(4,618),(4,619),(4,620),(4,621),(4,622),(4,623),(4,624),(4,625),(4,626),(4,627),(4,628),(4,629),(4,630),(4,631),(4,632),(4,633),(4,634),(4,635),(4,636),(4,637),(4,638),(4,639),(4,640),(4,641),(4,642),(4,643),(4,644),(4,645),(4,646),(4,647),(4,648),(4,649),(4,650),(4,651),(4,652),(4,653),(4,654),(4,655),(4,656),(4,657),(4,658),(4,659),(4,660),(4,661),(4,662),(4,663),(4,664),(4,665),(4,666),(4,667),(4,668),(4,669),(4,670),(4,671),(4,672),(4,673),(4,674),(4,675),(4,676),(4,677),(4,678),(4,679),(4,680),(4,681),(4,682),(4,683),(4,684),(4,685),(4,686),(4,687),(4,688),(4,689),(4,690),(4,691),(4,692),(4,693),(4,694),(4,695),(4,696),(4,697),(4,698),(4,699),(4,700),(4,701),(4,702),(4,703),(4,704),(4,705),(4,706),(4,707),(4,708),(4,709),(4,710),(4,711),(4,712),(4,713),(4,714),(4,715),(4,716),(4,717),(4,718),(4,719),(4,721),(4,722),(4,723),(4,724),(4,725),(4,726),(4,727),(4,728),(4,729),(4,730),(4,733),(4,734),(4,735),(4,736),(2,737),(4,738),(4,739),(2,740),(2,741),(2,742),(3,743),(2,744),(2,745),(2,746),(2,747),(4,748),(2,749),(3,750),(2,751),(2,752),(4,753),(2,754),(2,755),(2,756),(4,757),(3,758),(2,759),(2,760),(3,761),(3,762),(3,763),(3,764),(3,765),(3,766),(3,767),(3,768),(3,769),(3,770),(3,771),(3,772),(4,773),(3,774);
/*!40000 ALTER TABLE `rbac_role_permissions` ENABLE KEYS */;
UNLOCK TABLES;
@@ -532,4 +569,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2013-03-09 17:57:13
-- Dump completed on 2013-09-10 23:18:53
@@ -0,0 +1,7 @@
-- Update for Forgotten npcs to award credit.
UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27224 AND `source_type`=0 AND `id`=0 AND `link`=1;
UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27225 AND `source_type`=0 AND `id`=0 AND `link`=1;
UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27229 AND `source_type`=0 AND `id`=0 AND `link`=1;
UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27226 AND `source_type`=0 AND `id`=0 AND `link`=1;
-- Forced model for Channel Bunny... should've used that earlier.
UPDATE `creature` SET `modelid`=16925, `position_x`=1924.63, `position_y`=5574.76, `position_z`=273.122 WHERE `guid`=74872;
@@ -0,0 +1 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8455 AND `SourceEntry`=4;
@@ -0,0 +1,5 @@
UPDATE `creature_template` SET`AIName`='SmartAI' WHERE `entry`=26321;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=26321;
DELETE FROM `smart_scripts` WHERE `entryorguid`=26321;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26321,0,0,0,8,0,100,1,47530,0,0,0,33,26321,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lothalor Ancient - On Spellhit - Give Credit to Invoker');
+5 -5
View File
@@ -84,7 +84,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string const& arenaT
// Add captain as member
AddMember(CaptainGuid);
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid);
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u, Name: %s] [Type: %u] [Captain low GUID: %u]", GetId(), GetName().c_str(), GetType(), captainLowGuid);
return true;
}
@@ -306,9 +306,9 @@ void ArenaTeam::SetCaptain(uint64 guid)
newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
if (oldCaptain)
{
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].",
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u, Name: %s] [Type: %u].",
oldCaptain->GetName().c_str(), oldCaptain->GetGUIDLow(), newCaptain->GetName().c_str(),
newCaptain->GetGUIDLow(), GetId(), GetType());
newCaptain->GetGUIDLow(), GetId(), GetName().c_str(), GetType());
}
}
}
@@ -329,7 +329,7 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb)
// delete all info regarding this team
for (uint32 i = 0; i < ARENA_TEAM_END; ++i)
player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId());
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str());
}
// Only used for single member deletion, for arena team disband we use a single query for more efficiency
@@ -349,7 +349,7 @@ void ArenaTeam::Disband(WorldSession* session)
{
BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), "");
if (Player* player = session->GetPlayer())
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId());
TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str());
}
// Remove all members from arena team
+3 -2
View File
@@ -5215,9 +5215,10 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
uint32 oldMSTime = getMSTime();
time_t curTime = time(NULL);
tm* lt = localtime(&curTime);
tm lt;
ACE_OS::localtime_r(&curTime, &lt);
uint64 basetime(curTime);
TC_LOG_INFO(LOG_FILTER_GENERAL, "Returning mails current time: hour: %d, minute: %d, second: %d ", lt->tm_hour, lt->tm_min, lt->tm_sec);
TC_LOG_INFO(LOG_FILTER_GENERAL, "Returning mails current time: hour: %d, minute: %d, second: %d ", lt.tm_hour, lt.tm_min, lt.tm_sec);
// Delete all old mails without item and without body immediately, if starting server
if (!serverUp)
+4 -1
View File
@@ -1192,8 +1192,11 @@ bool SpellInfo::NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell) con
uint32 mask = 0;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if (Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetA.GetTarget() != TARGET_DEST_CASTER)
if (Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetA.GetTarget() != TARGET_DEST_CASTER
&& Effects[i].TargetB.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetB.GetTarget() != TARGET_DEST_CASTER)
{
mask |= Effects[i].GetProvidedTargetMask();
}
}
if (mask & TARGET_FLAG_UNIT_MASK)
+3 -2
View File
@@ -94,8 +94,9 @@ bool Weather::ReGenerate()
//78 days between January 1st and March 20nd; 365/4=91 days by season
// season source http://aa.usno.navy.mil/data/docs/EarthSeasons.html
time_t gtime = sWorld->GetGameTime();
struct tm * ltime = localtime(&gtime);
uint32 season = ((ltime->tm_yday - 78 + 365)/91)%4;
struct tm ltime;
ACE_OS::localtime_r(&gtime, &ltime);
uint32 season = ((ltime.tm_yday - 78 + 365)/91)%4;
static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };
+11 -5
View File
@@ -1798,7 +1798,9 @@ void World::SetInitialWorldSettings()
//mailtimer is increased when updating auctions
//one second is 1000 -(tested on win system)
/// @todo Get rid of magic numbers
mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval());
tm localTm;
ACE_OS::localtime_r(&m_gameTime, &localTm);
mail_timer = ((((localTm.tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval());
//1440
mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval()));
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires));
@@ -2818,7 +2820,8 @@ void World::InitDailyQuestResetTime()
// client built-in time for reset is 6:00 AM
// FIX ME: client not show day start time
time_t curTime = time(NULL);
tm localTm = *localtime(&curTime);
tm localTm;
ACE_OS::localtime_r(&curTime, &localTm);
localTm.tm_hour = 6;
localTm.tm_min = 0;
localTm.tm_sec = 0;
@@ -2851,7 +2854,8 @@ void World::InitRandomBGResetTime()
// generate time by config
time_t curTime = time(NULL);
tm localTm = *localtime(&curTime);
tm localTm;
ACE_OS::localtime_r(&curTime, &localTm);
localTm.tm_hour = getIntConfig(CONFIG_RANDOM_BG_RESET_HOUR);
localTm.tm_min = 0;
localTm.tm_sec = 0;
@@ -2878,7 +2882,8 @@ void World::InitGuildResetTime()
// generate time by config
time_t curTime = time(NULL);
tm localTm = *localtime(&curTime);
tm localTm;
ACE_OS::localtime_r(&curTime, &localTm);
localTm.tm_hour = getIntConfig(CONFIG_GUILD_RESET_HOUR);
localTm.tm_min = 0;
localTm.tm_sec = 0;
@@ -3003,7 +3008,8 @@ void World::ResetMonthlyQuests()
// generate time
time_t curTime = time(NULL);
tm localTm = *localtime(&curTime);
tm localTm;
ACE_OS::localtime_r(&curTime, &localTm);
int month = localTm.tm_mon;
int year = localTm.tm_year;
+4 -2
View File
@@ -362,9 +362,9 @@ public:
return false;
}
char* oldEmail = strtok(NULL, " ");
char* oldEmail = strtok((char*)args, " ");
char* password = strtok(NULL, " ");
char* email = strtok((char*)args, " ");
char* email = strtok(NULL, " ");
char* emailConfirmation = strtok(NULL, " ");
if (!oldEmail || !password || !email || !emailConfirmation)
@@ -467,6 +467,7 @@ public:
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
handler->HasPermission(RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE) ? "Yes" : "No");
return false;
}
if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), std::string(oldPassword)))
@@ -488,6 +489,7 @@ public:
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
emailConfirmation);
return false;
}
if (strcmp(newPassword, passwordConfirmation) != 0)
+21 -15
View File
@@ -436,21 +436,23 @@ public:
do
{
time_t timeBan = time_t(fields2[0].GetUInt32());
tm* tmBan = localtime(&timeBan);
tm tmBan;
ACE_OS::localtime_r(&timeBan, &tmBan);
if (fields2[0].GetUInt32() == fields2[1].GetUInt32())
{
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
accountName.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min,
accountName.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields2[2].GetCString(), fields2[3].GetCString());
}
else
{
time_t timeUnban = time_t(fields2[1].GetUInt32());
tm* tmUnban = localtime(&timeUnban);
tm tmUnban;
ACE_OS::localtime_r(&timeUnban, &tmUnban);
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
accountName.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min,
tmUnban->tm_year%100, tmUnban->tm_mon+1, tmUnban->tm_mday, tmUnban->tm_hour, tmUnban->tm_min,
accountName.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
fields2[2].GetCString(), fields2[3].GetCString());
}
}
@@ -523,21 +525,23 @@ public:
do
{
time_t timeBan = time_t(banFields[0].GetUInt32());
tm* tmBan = localtime(&timeBan);
tm tmBan;
ACE_OS::localtime_r(&timeBan, &tmBan);
if (banFields[0].GetUInt32() == banFields[1].GetUInt32())
{
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
char_name.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min,
char_name.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
banFields[2].GetCString(), banFields[3].GetCString());
}
else
{
time_t timeUnban = time_t(banFields[1].GetUInt32());
tm* tmUnban = localtime(&timeUnban);
tm tmUnban;
ACE_OS::localtime_r(&timeUnban, &tmUnban);
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
char_name.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min,
tmUnban->tm_year%100, tmUnban->tm_mon+1, tmUnban->tm_mday, tmUnban->tm_hour, tmUnban->tm_min,
char_name.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
banFields[2].GetCString(), banFields[3].GetCString());
}
}
@@ -602,20 +606,22 @@ public:
handler->SendSysMessage("-------------------------------------------------------------------------------");
Field* fields = result->Fetch();
time_t timeBan = time_t(fields[1].GetUInt32());
tm* tmBan = localtime(&timeBan);
tm tmBan;
ACE_OS::localtime_r(&timeBan, &tmBan);
if (fields[1].GetUInt32() == fields[2].GetUInt32())
{
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
fields[0].GetCString(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min,
fields[0].GetCString(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields[3].GetCString(), fields[4].GetCString());
}
else
{
time_t timeUnban = time_t(fields[2].GetUInt32());
tm* tmUnban = localtime(&timeUnban);
tm tmUnban;
ACE_OS::localtime_r(&timeUnban, &tmUnban);
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
fields[0].GetCString(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min,
tmUnban->tm_year%100, tmUnban->tm_mon+1, tmUnban->tm_mday, tmUnban->tm_hour, tmUnban->tm_min,
fields[0].GetCString(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
fields[3].GetCString(), fields[4].GetCString());
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ public:
return false;
}
CreatureTemplate const* creatrueTemplate = sObjectMgr->GetCreatureTemplate(creatureTarget->GetEntry());
CreatureTemplate const* creatrueTemplate = creatureTarget->GetCreatureTemplate();
// Creatures with family 0 crashes the server
if (!creatrueTemplate->family)
{
@@ -1619,16 +1619,16 @@ class spell_halion_clear_debuffs : public SpellScriptLoader
class TwilightCutterSelector
{
public:
TwilightCutterSelector(Unit* caster, Unit* cutterCaster) : _caster(caster), _cutterCaster(cutterCaster) {}
TwilightCutterSelector(Unit* caster, Unit* target) : _caster(caster), _channelTarget(target) {}
bool operator()(WorldObject* unit)
{
return !unit->IsInBetween(_caster, _cutterCaster, 4.0f);
return !unit->IsInBetween(_caster, _channelTarget, 4.0f);
}
private:
Unit* _caster;
Unit* _cutterCaster;
Unit* _channelTarget;
};
class spell_halion_twilight_cutter : public SpellScriptLoader
@@ -1646,13 +1646,10 @@ class spell_halion_twilight_cutter : public SpellScriptLoader
return;
Unit* caster = GetCaster();
if (Aura* cutter = caster->GetAura(SPELL_TWILIGHT_CUTTER))
if (Unit* channelTarget = ObjectAccessor::GetUnit(*caster, caster->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT)))
{
if (Unit* cutterCaster = cutter->GetCaster())
{
unitList.remove_if(TwilightCutterSelector(caster, cutterCaster));
return;
}
unitList.remove_if(TwilightCutterSelector(caster, channelTarget));
return;
}
// In case cutter caster werent found for some reason
@@ -23,26 +23,26 @@
enum Yells
{
SAY_AGGRO = 0,
SAY_PHASE2 = 1,
SAY_PHASE3 = 2,
SAY_DEATH = 3,
SAY_SLAY = 4,
SAY_THROW_SARONITE = 5,
SAY_CAST_DEEP_FREEZE = 6,
SAY_AGGRO = 0,
SAY_PHASE2 = 1,
SAY_PHASE3 = 2,
SAY_DEATH = 3,
SAY_SLAY = 4,
SAY_THROW_SARONITE = 5,
SAY_CAST_DEEP_FREEZE = 6,
SAY_TYRANNUS_DEATH = 0
SAY_TYRANNUS_DEATH = 0
};
enum Spells
{
SPELL_PERMAFROST = 70326,
SPELL_THROW_SARONITE = 68788,
SPELL_THUNDERING_STOMP = 68771,
SPELL_CHILLING_WAVE = 68778,
SPELL_DEEP_FREEZE = 70381,
SPELL_FORGE_MACE = 68785,
SPELL_FORGE_BLADE = 68774,
SPELL_PERMAFROST = 70326,
SPELL_THROW_SARONITE = 68788,
SPELL_THUNDERING_STOMP = 68771,
SPELL_CHILLING_WAVE = 68778,
SPELL_DEEP_FREEZE = 70381,
SPELL_FORGE_MACE = 68785,
SPELL_FORGE_BLADE = 68774
};
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(68786, 70336)
@@ -50,9 +50,9 @@ enum Spells
enum Phases
{
PHASE_ONE = 1,
PHASE_TWO = 2,
PHASE_THREE = 3
PHASE_ONE = 1,
PHASE_TWO = 2,
PHASE_THREE = 3
};
enum MiscData
@@ -60,58 +60,45 @@ enum MiscData
EQUIP_ID_SWORD = 49345,
EQUIP_ID_MACE = 49344,
ACHIEV_DOESNT_GO_TO_ELEVEN = 0,
POINT_FORGE = 0,
POINT_FORGE = 0
};
Position const northForgePos = {722.5643f, -234.1615f, 527.182f, 2.16421f};
Position const southForgePos = {639.257f, -210.1198f, 529.015f, 0.523599f};
enum Events
{
EVENT_THROW_SARONITE = 1,
EVENT_CHILLING_WAVE = 2,
EVENT_DEEP_FREEZE = 3,
EVENT_FORGE_JUMP = 4,
EVENT_RESUME_ATTACK = 5
};
Position const northForgePos = { 722.5643f, -234.1615f, 527.182f, 2.16421f };
Position const southForgePos = { 639.257f, -210.1198f, 529.015f, 0.523599f };
class boss_garfrost : public CreatureScript
{
enum Events
{
EVENT_THROW_SARONITE = 1,
EVENT_CHILLING_WAVE = 2,
EVENT_DEEP_FREEZE = 3,
EVENT_JUMP = 4,
EVENT_FORGING = 5,
EVENT_RESUME_ATTACK = 6,
};
public:
boss_garfrost() : CreatureScript("boss_garfrost") { }
struct boss_garfrostAI : public BossAI
{
boss_garfrostAI(Creature* creature) : BossAI(creature, DATA_GARFROST)
{
}
void InitializeAI() OVERRIDE
{
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
me->IsAIEnabled = false;
else if (!me->isDead())
Reset();
}
boss_garfrostAI(Creature* creature) : BossAI(creature, DATA_GARFROST) { }
void Reset() OVERRIDE
{
events.Reset();
_Reset();
events.SetPhase(PHASE_ONE);
SetEquipmentSlots(true);
_permafrostStack = 0;
instance->SetBossState(DATA_GARFROST, NOT_STARTED);
}
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
Talk(SAY_AGGRO);
DoCast(me, SPELL_PERMAFROST);
me->CallForHelp(70.0f);
events.ScheduleEvent(EVENT_THROW_SARONITE, 7000);
instance->SetBossState(DATA_GARFROST, IN_PROGRESS);
}
void KilledUnit(Unit* victim) OVERRIDE
@@ -122,12 +109,11 @@ enum Events
void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS)))
tyrannus->AI()->Talk(SAY_TYRANNUS_DEATH);
instance->SetBossState(DATA_GARFROST, DONE);
}
void DamageTaken(Unit* /*attacker*/, uint32& /*uiDamage*/) OVERRIDE
@@ -138,7 +124,7 @@ enum Events
Talk(SAY_PHASE2);
events.DelayEvents(8000);
DoCast(me, SPELL_THUNDERING_STOMP);
events.ScheduleEvent(EVENT_JUMP, 1500);
events.ScheduleEvent(EVENT_FORGE_JUMP, 1500);
return;
}
@@ -148,7 +134,7 @@ enum Events
Talk(SAY_PHASE3);
events.DelayEvents(8000);
DoCast(me, SPELL_THUNDERING_STOMP);
events.ScheduleEvent(EVENT_JUMP, 1500);
events.ScheduleEvent(EVENT_FORGE_JUMP, 1500);
return;
}
}
@@ -220,15 +206,15 @@ enum Events
}
events.ScheduleEvent(EVENT_DEEP_FREEZE, 35000, 0, PHASE_THREE);
break;
case EVENT_JUMP:
case EVENT_FORGE_JUMP:
me->AttackStop();
if (events.IsInPhase(PHASE_TWO))
me->GetMotionMaster()->MoveJump(northForgePos.GetPositionX(), northForgePos.GetPositionY(), northForgePos.GetPositionZ(), 25.0f, 15.0f);
me->GetMotionMaster()->MoveJump(northForgePos, 25.0f, 15.0f, POINT_FORGE);
else if (events.IsInPhase(PHASE_THREE))
me->GetMotionMaster()->MoveJump(southForgePos.GetPositionX(), southForgePos.GetPositionY(), southForgePos.GetPositionZ(), 25.0f, 15.0f);
me->GetMotionMaster()->MoveJump(southForgePos, 25.0f, 15.0f, POINT_FORGE);
break;
case EVENT_RESUME_ATTACK:
if (events.IsInPhase(PHASE_THREE))
if (events.IsInPhase(PHASE_TWO))
events.ScheduleEvent(EVENT_CHILLING_WAVE, 5000, 0, PHASE_TWO);
else if (events.IsInPhase(PHASE_THREE))
events.ScheduleEvent(EVENT_DEEP_FREEZE, 10000, 0, PHASE_THREE);
@@ -248,7 +234,7 @@ enum Events
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_garfrostAI(creature);
return GetPitOfSaronAI<boss_garfrostAI>(creature);
}
};
@@ -42,7 +42,7 @@ enum Spells
SPELL_STRANGULATING = 69413, //krick's selfcast in intro
SPELL_SUICIDE = 7,
SPELL_KRICK_KILL_CREDIT = 71308,
SPELL_NECROMANTIC_POWER = 69753,
SPELL_NECROMANTIC_POWER = 69753
};
enum Yells
@@ -71,7 +71,7 @@ enum Yells
SAY_SYLVANAS_OUTRO_4 = 1,
SAY_SYLVANAS_OUTRO_10 = 2,
SAY_TYRANNUS_OUTRO_7 = 1,
SAY_TYRANNUS_OUTRO_9 = 2,
SAY_TYRANNUS_OUTRO_9 = 2
};
enum Events
@@ -98,24 +98,24 @@ enum Events
EVENT_OUTRO_11 = 18,
EVENT_OUTRO_12 = 19,
EVENT_OUTRO_13 = 20,
EVENT_OUTRO_END = 21,
EVENT_OUTRO_END = 21
};
enum KrickPhase
{
PHASE_COMBAT = 1,
PHASE_OUTRO = 2,
PHASE_OUTRO = 2
};
enum Actions
{
ACTION_OUTRO = 1,
ACTION_OUTRO = 1
};
enum Points
{
POINT_KRICK_INTRO = 364770,
POINT_KRICK_DEATH = 364771,
POINT_KRICK_DEATH = 364771
};
static const Position outroPos[8] =
@@ -127,7 +127,7 @@ static const Position outroPos[8] =
{835.5887f, 139.4345f, 530.9526f, 0.0000000f}, // Tyrannus fly down Position (not sniffed)
{828.9342f, 118.6247f, 514.5190f, 0.0000000f}, // Krick's Choke Position
{828.9342f, 118.6247f, 509.4958f, 0.0000000f}, // Kirck's Death Position
{914.4820f, 143.1602f, 633.3624f, 0.0000000f}, // Tyrannus fly up (not sniffed)
{914.4820f, 143.1602f, 633.3624f, 0.0000000f} // Tyrannus fly up (not sniffed)
};
class boss_ick : public CreatureScript
@@ -142,14 +142,6 @@ class boss_ick : public CreatureScript
ASSERT(_vehicle);
}
void InitializeAI() OVERRIDE
{
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
me->IsAIEnabled = false;
else if (!me->isDead())
Reset();
}
void Reset() OVERRIDE
{
events.Reset();
@@ -163,6 +155,8 @@ class boss_ick : public CreatureScript
void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
if (Creature* krick = GetKrick())
krick->AI()->Talk(SAY_KRICK_AGGRO);
@@ -170,8 +164,6 @@ class boss_ick : public CreatureScript
events.ScheduleEvent(EVENT_TOXIC_WASTE, 5000);
events.ScheduleEvent(EVENT_SHADOW_BOLT, 10000);
events.ScheduleEvent(EVENT_SPECIAL, urand(30000, 35000));
instance->SetBossState(DATA_ICK, IN_PROGRESS);
}
void EnterEvadeMode() OVERRIDE
@@ -281,7 +273,7 @@ class boss_ick : public CreatureScript
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ickAI(creature);
return GetPitOfSaronAI<boss_ickAI>(creature);
}
};
@@ -296,14 +288,6 @@ class boss_krick : public CreatureScript
{
}
void InitializeAI() OVERRIDE
{
if (!_instanceScript || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
me->IsAIEnabled = false;
else if (!me->isDead())
Reset();
}
void Reset() OVERRIDE
{
_events.Reset();
@@ -509,7 +493,7 @@ class boss_krick : public CreatureScript
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_krickAI(creature);
return GetPitOfSaronAI<boss_krickAI>(creature);
}
};
@@ -41,7 +41,7 @@ class instance_pit_of_saron : public InstanceMapScript
{
instance_pit_of_saron_InstanceScript(Map* map) : InstanceScript(map)
{
SetBossNumber(MAX_ENCOUNTER);
SetBossNumber(EncounterCount);
LoadDoorData(Doors);
_garfrostGUID = 0;
_krickGUID = 0;
@@ -292,7 +292,7 @@ class instance_pit_of_saron : public InstanceMapScript
if (dataHead1 == 'P' && dataHead2 == 'S')
{
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
for (uint8 i = 0; i < EncounterCount; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
@@ -15,14 +15,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_PIT_OF_SARON_H
#define DEF_PIT_OF_SARON_H
#include "Map.h"
#include "Creature.h"
#ifndef PIT_OF_SARON_H_
#define PIT_OF_SARON_H_
#define PoSScriptName "instance_pit_of_saron"
#define MAX_ENCOUNTER 3
uint32 const EncounterCount = 3;
enum DataTypes
{
@@ -37,7 +35,7 @@ enum DataTypes
DATA_JAINA_SYLVANAS_1 = 5, // GUID of either Jaina or Sylvanas part 1, depending on team, as it's the same spawn.
DATA_JAINA_SYLVANAS_2 = 6, // GUID of either Jaina or Sylvanas part 2, depending on team, as it's the same spawn.
DATA_TYRANNUS_EVENT = 7,
DATA_TEAM_IN_INSTANCE = 8,
DATA_TEAM_IN_INSTANCE = 8
};
enum CreatureIds
@@ -94,17 +92,13 @@ enum GameObjectIds
{
GO_SARONITE_ROCK = 196485,
GO_ICE_WALL = 201885,
GO_HALLS_OF_REFLECTION_PORTCULLIS = 201848,
GO_HALLS_OF_REFLECTION_PORTCULLIS = 201848
};
template<class AI>
AI* GetPitOfSaronAI(Creature* creature)
{
if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
if (instance->GetInstanceScript())
if (instance->GetScriptId() == sObjectMgr->GetScriptId(PoSScriptName))
return new AI(creature);
return NULL;
return GetInstanceAI<AI>(creature, PoSScriptName);
}
#endif
#endif // PIT_OF_SARON_H_
@@ -21,10 +21,10 @@
DoorData const doorData[] =
{
{ GO_VOLKHAN_DOOR, DATA_VOLKHAN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_IONAR_DOOR, DATA_IONAR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_LOKEN_DOOR, DATA_LOKEN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
{ GO_VOLKHAN_DOOR, DATA_VOLKHAN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_IONAR_DOOR, DATA_IONAR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_LOKEN_DOOR, DATA_LOKEN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
};
class instance_halls_of_lightning : public InstanceMapScript
@@ -23,8 +23,8 @@
DoorData const doorData[] =
{
{ GO_SJONNIR_DOOR, DATA_BRANN_EVENT, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
{ GO_SJONNIR_DOOR, DATA_BRANN_EVENT, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
};
class instance_halls_of_stone : public InstanceMapScript
@@ -248,7 +248,6 @@ class ThunderingStormCheck
private:
WorldObject const* _source;
float _dist;
};
// 39365 - Thundering Storm
+1
View File
@@ -92,6 +92,7 @@
#include <ace/Guard_T.h>
#include <ace/RW_Thread_Mutex.h>
#include <ace/Thread_Mutex.h>
#include <ace/OS_NS_time.h>
#if PLATFORM == PLATFORM_WINDOWS
# include <ace/config-all.h>
+3 -2
View File
@@ -20,9 +20,10 @@
std::string LogMessage::getTimeStr(time_t time)
{
tm* aTm = localtime(&time);
tm aTm;
ACE_OS::localtime_r(&time, &aTm);
char buf[20];
snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec);
snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
return std::string(buf);
}
+3 -2
View File
@@ -295,7 +295,8 @@ void Log::write(LogMessage* msg)
std::string Log::GetTimestampStr()
{
time_t t = time(NULL);
tm* aTm = localtime(&t);
tm aTm;
ACE_OS::localtime_r(&t, &aTm);
// YYYY year
// MM month (2 digits 01-12)
// DD day (2 digits 01-31)
@@ -303,7 +304,7 @@ std::string Log::GetTimestampStr()
// MM minutes (2 digits 00-59)
// SS seconds (2 digits 00-59)
char buf[20];
snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec);
snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
return std::string(buf);
}
+4 -2
View File
@@ -23,6 +23,7 @@
#include "Errors.h"
#include "ByteConverter.h"
#include <ace/OS_NS_time.h>
#include <exception>
#include <list>
#include <map>
@@ -585,8 +586,9 @@ class ByteBuffer
void AppendPackedTime(time_t time)
{
tm* lt = localtime(&time);
append<uint32>((lt->tm_year - 100) << 24 | lt->tm_mon << 20 | (lt->tm_mday - 1) << 14 | lt->tm_wday << 11 | lt->tm_hour << 6 | lt->tm_min);
tm lt;
ACE_OS::localtime_r(&time, &lt);
append<uint32>((lt.tm_year - 100) << 24 | lt.tm_mon << 20 | (lt.tm_mday - 1) << 14 | lt.tm_wday << 11 | lt.tm_hour << 6 | lt.tm_min);
}
void put(size_t pos, const uint8 *src, size_t cnt)
+1 -1
View File
@@ -66,7 +66,7 @@ struct IntervalTimer
void Reset()
{
if (_current >= _interval)
_current -= _interval;
_current %= _interval;
}
void SetCurrent(time_t current)
+3 -2
View File
@@ -215,7 +215,8 @@ uint32 TimeStringToSecs(const std::string& timestring)
std::string TimeToTimestampStr(time_t t)
{
tm* aTm = localtime(&t);
tm aTm;
ACE_OS::localtime_r(&t, &aTm);
// YYYY year
// MM month (2 digits 01-12)
// DD day (2 digits 01-31)
@@ -223,7 +224,7 @@ std::string TimeToTimestampStr(time_t t)
// MM minutes (2 digits 00-59)
// SS seconds (2 digits 00-59)
char buf[20];
snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec);
snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
return std::string(buf);
}