diff options
author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-02-21 00:45:02 +0100 |
---|---|---|
committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-02-21 00:45:02 +0100 |
commit | c0c2e533a967640bd14553fa98916974e013e7bd (patch) | |
tree | 593c67bc0d63e33efe7658b2f81ccf1cc5df5134 | |
parent | 1df992e918e954431f49626d44345530b50e591a (diff) | |
parent | 59c3c6b8a6a318c3b937defaeb165a5f77b25ff8 (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Handlers/MiscHandler.cpp
-rw-r--r-- | sql/updates/world/2013_02_19_02_world_conditions.sql | 38 | ||||
-rw-r--r-- | sql/updates/world/2013_02_19_03_world_sai.sql | 28 | ||||
-rw-r--r-- | sql/updates/world/2013_02_19_04_world_misc_equip.sql | 30 | ||||
-rw-r--r-- | src/server/game/Accounts/AccountMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 5 | ||||
-rw-r--r-- | src/server/game/Entities/Creature/Creature.h | 6 | ||||
-rw-r--r-- | src/server/game/Events/GameEventMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 10 | ||||
-rw-r--r-- | src/server/game/Handlers/MiscHandler.cpp | 31 | ||||
-rw-r--r-- | src/server/game/Server/WorldSession.cpp | 39 | ||||
-rw-r--r-- | src/server/game/Server/WorldSession.h | 2 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp | 14 | ||||
-rw-r--r-- | src/server/shared/Database/MySQLConnection.cpp | 5 |
13 files changed, 143 insertions, 69 deletions
diff --git a/sql/updates/world/2013_02_19_02_world_conditions.sql b/sql/updates/world/2013_02_19_02_world_conditions.sql new file mode 100644 index 00000000000..87c964937ef --- /dev/null +++ b/sql/updates/world/2013_02_19_02_world_conditions.sql @@ -0,0 +1,38 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceGroup`=12944 AND `SourceEntry` IN (20761,17051,17022,17018,17023,19444); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceGroup`=12944 AND `SourceEntry` IN (19219,17017,17025,19330,19448,17059,17060,17049,19206); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceGroup`=12944 AND `SourceEntry` IN (19220,19332,19333,19331,19449,19209,19208,19207,17053,17052); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=23 AND `SourceGroup`=12944 AND `SourceEntry` IN (19211,19210,19212,20040); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +-- Conditon rep Friendly +(23,12944,20761,0,0,5,0,59,16,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Friendly with Thorium Brotherhood'), +(23,12944,17051,0,0,5,0,59,16,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Friendly with Thorium Brotherhood'), +(23,12944,17022,0,0,5,0,59,16,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Friendly with Thorium Brotherhood'), +(23,12944,17018,0,0,5,0,59,16,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Friendly with Thorium Brotherhood'), +(23,12944,17023,0,0,5,0,59,16,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Friendly with Thorium Brotherhood'), +(23,12944,19444,0,0,5,0,59,16,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Friendly with Thorium Brotherhood'), +-- Conditon rep Honored +(23,12944,19219,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,17017,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,17025,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,19330,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,19448,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,17059,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,17060,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,17049,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +(23,12944,19206,0,0,5,0,59,32,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Honored with Thorium Brotherhood'), +-- Conditon rep Revered +(23,12944,19220,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19332,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19333,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19331,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19449,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19209,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19208,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,19207,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,17053,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +(23,12944,17052,0,0,5,0,59,64,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Revered with Thorium Brotherhood'), +-- Conditon rep Exalted +(23,12944,19211,0,0,5,0,59,128,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Exalted with Thorium Brotherhood'), +(23,12944,19210,0,0,5,0,59,128,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Exalted with Thorium Brotherhood'), +(23,12944,19212,0,0,5,0,59,128,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Exalted with Thorium Brotherhood'), +(23,12944,20040,0,0,5,0,59,128,0,0,0, '', 'Lokhtos Darkbargainer - Only sell item if Exalted with Thorium Brotherhood'); diff --git a/sql/updates/world/2013_02_19_03_world_sai.sql b/sql/updates/world/2013_02_19_03_world_sai.sql new file mode 100644 index 00000000000..ad2c9beeab1 --- /dev/null +++ b/sql/updates/world/2013_02_19_03_world_sai.sql @@ -0,0 +1,28 @@ +-- Fix quest: Gather the Orbs http://www.wowhead.com/quest=10859 +-- ID indexes +-- Almost all is based on Untaught script, just corrected some stuff with sniff +SET @OrbCollectingTotem := 22333; +SET @LightOrb := 20635; +SET @Script := @LightOrb * 100; +SET @BanishedState := 32566; +SET @ArcaneExplosion := 35426; -- such spells need delay to execute properly, that is why I made actionlist +-- Update templates +UPDATE `creature_template` SET `unit_flags`=unit_flags|0x02000000 WHERE `entry`=@LightOrb; -- sniff +-- Add SAI support for Light Orbs and Totem +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@LightOrb; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@LightOrb,@OrbCollectingTotem); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@LightOrb,@OrbCollectingTotem) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script AND `source_type`=9; +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 +(@OrbCollectingTotem,0,0,1,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@LightOrb,20,0,0,0,0,0, 'Orb collecting totem - On spawned - Set Data 0 1'), +(@OrbCollectingTotem,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Orb collecting totem - Linked with previous event - Store invoker'), +(@OrbCollectingTotem,0,2,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@LightOrb,20,0,0,0,0,0, 'Orb collecting totem - Linked with previous event - Send stored target list 1'), +(@LightOrb,0,0,0,25,0,100,1,0,0,0,0,11,@BanishedState,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spawn/reset - Cast Purple Banish State'), +(@LightOrb,0,1,0,38,0,100,0,0,1,30000,30000,69,1,0,0,0,0,0,19,@OrbCollectingTotem,20,0,0,0,0,0, 'Light Orb - On Data Set 0 1 - Move to totem'), +(@LightOrb,0,2,3,34,0,100,1,8,1,0,0,11,@ArcaneExplosion,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - On point 1 reached - Cast arcane explosion'), +(@LightOrb,0,3,4,61,0,100,0,0,0,0,0,33,21929,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Light Orb - Linkedw with previous event - Call kill credit'), +(@LightOrb,0,4,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Linkedw with previous event - Start action list to display arcase explosion'), +(@Script,9,0,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Action 0 - Set unseen'), +(@Script,9,1,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Action 1 - Despawn in 100 ms'); +-- Remove deprecated required spell cast that was blocking the credit, on top of that it had some nosense spell that has nothing to do with quest?! +UPDATE `quest_template` SET `requiredspellcast1`=0 WHERE `id`=10859; diff --git a/sql/updates/world/2013_02_19_04_world_misc_equip.sql b/sql/updates/world/2013_02_19_04_world_misc_equip.sql new file mode 100644 index 00000000000..dacf5515439 --- /dev/null +++ b/sql/updates/world/2013_02_19_04_world_misc_equip.sql @@ -0,0 +1,30 @@ +ALTER TABLE `creature` CHANGE `equipment_id` `equipment_id` tinyint(3) signed NOT NULL DEFAULT '0'; +ALTER TABLE `creature_equip_template` CHANGE `id` `id` tinyint(3) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `game_event_model_equip` CHANGE `equipment_id` `equipment_id` tinyint(3) unsigned NOT NULL DEFAULT '0'; + +UPDATE `creature` SET `equipment_id`=0 WHERE `id` NOT IN (SELECT `entry` FROM `creature_equip_template`); + +-- content +DELETE FROM `creature_equip_template` WHERE `entry` IN (25317, 2110, 26797, 25239) AND `id`=1; +DELETE FROM `creature_equip_template` WHERE `entry` IN (32720) AND `id`=2; +INSERT INTO `creature_equip_template` (`entry`, `id`, `itemEntry1`, `itemEntry2`, `itemEntry3`) VALUES +(25317, 1, 2178, 143, 0), +(2110, 1, 24324, 24324, 24319), +(26797, 1, 19970, 0, 0), +(25239, 1, 6829, 0, 0), +(32720, 2, 31308, 0, 0); + +UPDATE `creature` SET `equipment_id`=0 WHERE `guid` IN (200908,200918,200968,200971,200980,200998,201004,201035,201050,201052,201068,201094,201103,201112,201113,201135,201149,201150,201192,201203,201206,201363,201438,201449,201486,201685,201710,201722,201740,201752,201756,201773,201782,201788,201814,201864,201908,201916,202023,202043,202146,202164,39317,39318,39319,39320,39321,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39333,40170,40171,40227,40563,40564,41319,41322,41323,41324,41325,41326,41327,41328,41669,41726,42616,42641,42668,42669,42680,42686,44193,44194,46975,47413,47414,47415,47416,47417,47418,47419,47420,47421,47422,47423,47424,47425,47426,47427,47428,47429,47430,47431,47445,47632,48383,49987,51458,51751,51982,51983,52926,52927,52928,52929,53166,53651,53844,53845,53846,53847,53848,53849,53850,53851,53951,57315,68749,68750,68751,68752,68753,76521,79676,79725,79758,79759,79760,79761,79762,79763,79764,117784,117785,117788,117789,117790,117796,117797,117798,117799,117800,117801,117802,112352,112353,112354,112355,112356,112357,112358,112359,112360,112361,112362,112363,112364,112365,112366,112367,112368,112371,112372); + +-- 25317 +UPDATE `creature` SET `equipment_id`=1 WHERE `guid` IN (117794); + +-- 2110 +UPDATE `creature` SET `equipment_id`=1 WHERE `guid` IN (102345,102347,102348,125999,126000,126001,126002,126003,126004,126005,126006,126007,126008,126009,126010,126011,126012,126013,126014,126015,126016,126095,126096,126097,126098,126099,126100,126101,126724,126725,126726,126727,126729,126730,126731,127489,127490,127491,127492,131859,131860,131861,131862,131863,13354,13355,13356,13357,16230,16231,16232,16233,16234,16235,16236,18316,18392,28779,28781,28782,31778,31779,31965,31973,32010,32011,4212,4214,4215,4227,42676,42683,42708,42714,42726,4274,42793,4286,4310,4313,4352,4358,4408,45397,45398,45399,45403,46795,46796,46799,46810,46860,46861,47175,47182,47184,47980,47981,47988,48220,48263,48265,48909,4939,5031,5191,52670,53043,53116,53119,53181,6007,6049,6050,6051,6056,6057,6058,6076,86393,86394,87158,87161,87163,87164,87165,87168,87225,87234,87236,87252); + +-- 26797 +UPDATE `creature` SET `equipment_id`=1 WHERE `guid` IN (112351, 112369, 112370); + +UPDATE `smart_scripts` SET `action_param1` = 1 WHERE `entryorguid` = 2523900 AND `source_type` = 9 AND `id` = 2; +UPDATE `smart_scripts` SET `action_param1` = 0 WHERE `entryorguid` = 2523901 AND `source_type` = 9 AND `id` = 3; +UPDATE `smart_scripts` SET `action_param1` = 2 WHERE `entryorguid` = 32720 AND `source_type` = 0 AND `id` = 0; diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index bd560c8266e..12624c29686 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -1,4 +1,4 @@ - /* +/* * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 9cec59db168..58f2edf5f74 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -145,7 +145,7 @@ Creature::Creature(bool isWorldObject): Unit(isWorldObject), MapCreature(), lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLowGUID(0), m_PlayerDamageReq(0), m_lootRecipient(0), m_lootRecipientGroup(0), m_corpseRemoveTime(0), m_respawnTime(0), m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE), -m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(1), m_originalEquipmentId(1), m_AlreadyCallAssistance(false), +m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_originalEquipmentId(0), m_AlreadyCallAssistance(false), m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), m_creatureInfo(NULL), m_creatureData(NULL), m_path_id(0), m_formation(NULL) { @@ -325,7 +325,10 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data if (!data || data->equipmentId == 0) // use default from the template LoadEquipment(GetOriginalEquipmentId()); else if (data && data->equipmentId != 0) // override, 0 means no equipment + { + m_originalEquipmentId = data->equipmentId; LoadEquipment(data->equipmentId); + } SetName(normalInfo->Name); // at normal entry always diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 6e737709f99..4127ab281dd 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -552,8 +552,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature void UpdateAttackPowerAndDamage(bool ranged = false); void UpdateDamagePhysical(WeaponAttackType attType); - uint8 GetOriginalEquipmentId() const { return m_originalEquipmentId; } - uint32 GetCurrentEquipmentId() { return m_equipmentId; } + int8 GetOriginalEquipmentId() const { return m_originalEquipmentId; } + uint8 GetCurrentEquipmentId() { return m_equipmentId; } void SetCurrentEquipmentId(uint8 id) { m_equipmentId = id; } float GetSpellDamageMod(int32 Rank); @@ -751,7 +751,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature MovementGeneratorType m_defaultMovementType; uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid uint8 m_equipmentId; - uint8 m_originalEquipmentId; + int8 m_originalEquipmentId; // can be -1 bool m_AlreadyCallAssistance; bool m_AlreadySearchedAssistance; diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index d06ff1fa533..36193d78218 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -1366,7 +1366,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate) sObjectMgr->GetCreatureModelRandomGender(&displayID); if (data2->equipmentId == 0) - itr->second.equipement_id_prev = 1; + itr->second.equipement_id_prev = 0; ///@todo: verify this line else if (data2->equipmentId != -1) itr->second.equipement_id_prev = data->equipmentId; itr->second.modelid_prev = displayID; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index b5273c72468..399087d1c0a 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1492,7 +1492,7 @@ void ObjectMgr::LoadCreatures() data.id = entry; data.mapid = fields[2].GetUInt16(); data.displayid = fields[3].GetUInt32(); - data.equipmentId = fields[4].GetInt32(); + data.equipmentId = fields[4].GetInt8(); data.posX = fields[5].GetFloat(); data.posY = fields[6].GetFloat(); data.posZ = fields[7].GetFloat(); @@ -1534,13 +1534,13 @@ void ObjectMgr::LoadCreatures() if (!ok) continue; - // -1 random, 0 no equipment, 1 is default (may or may not have equipment) + // -1 random, 0 no equipment, if (data.equipmentId != 0) { - if (!GetEquipmentInfo(data.id, data.equipmentId) && data.equipmentId != 1) + if (!GetEquipmentInfo(data.id, data.equipmentId)) { sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (Entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", data.id, data.equipmentId); - data.equipmentId = 1; + data.equipmentId = 0; } } @@ -1714,7 +1714,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float data.id = entry; data.mapid = mapId; data.displayid = 0; - data.equipmentId = 1; + data.equipmentId = 0; data.posX = x; data.posY = y; data.posZ = z; diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 4d72e79f4df..a2768319150 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -375,33 +375,34 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/) if (uint64 lguid = GetPlayer()->GetLootGUID()) DoLootRelease(lguid); - uint32 reason = 0; + bool instantLogout = (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->isInCombat()) || + GetPlayer()->isInFlight() || HasPermission(RBAC_PERM_INSTANT_LOGOUT); + + /// TODO: Possibly add RBAC permission to log out in combat + bool canLogoutInCombat = GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING); - if (GetPlayer()->isInCombat()) + uint32 reason = 0; + if (GetPlayer()->isInCombat() && !canLogoutInCombat) reason = 1; else if (GetPlayer()->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR)) reason = 3; // is jumping or falling else if (GetPlayer()->duel || GetPlayer()->HasAura(9454)) // is dueling or frozen by GM via freeze command reason = 2; // FIXME - Need the correct value + WorldPacket data(SMSG_LOGOUT_RESPONSE, 1+4); + data << uint32(reason); + data << uint8(0); + SendPacket(&data); + if (reason) { - WorldPacket data(SMSG_LOGOUT_RESPONSE, 1+4); - data << uint32(reason); - data << uint8(0); - SendPacket(&data); LogoutRequest(0); return; } - //instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in worldserver.conf - if (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() || - HasPermission(RBAC_PERM_INSTANT_LOGOUT)) + // instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in worldserver.conf + if (instantLogout) { - WorldPacket data(SMSG_LOGOUT_RESPONSE, 1+4); - data << uint32(reason); - data << uint8(1); // instant logout - SendPacket(&data); LogoutPlayer(true); return; } @@ -414,10 +415,6 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/) GetPlayer()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); } - WorldPacket data(SMSG_LOGOUT_RESPONSE, 1+4); - data << uint32(0); - data << uint8(0); - SendPacket(&data); LogoutRequest(time(NULL)); } diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index d12128b11c1..1819b829404 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -447,14 +447,14 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) } /// %Log the player out -void WorldSession::LogoutPlayer(bool Save) +void WorldSession::LogoutPlayer(bool save) { // finish pending transfers before starting the logout while (_player && _player->IsBeingTeleportedFar()) HandleMoveWorldportAckOpcode(); m_playerLogout = true; - m_playerSave = Save; + m_playerSave = save; if (_player) { @@ -469,39 +469,6 @@ void WorldSession::LogoutPlayer(bool Save) _player->BuildPlayerRepop(); _player->RepopAtGraveyard(); } - else if (!_player->getAttackers().empty()) - { - // build set of player who attack _player or who have pet attacking of _player - std::set<Player*> aset; - for (Unit::AttackerSet::const_iterator itr = _player->getAttackers().begin(); itr != _player->getAttackers().end(); ++itr) - { - Unit* owner = (*itr)->GetOwner(); // including player controlled case - if (owner && owner->GetTypeId() == TYPEID_PLAYER) - aset.insert(owner->ToPlayer()); - else if ((*itr)->GetTypeId() == TYPEID_PLAYER) - aset.insert((Player*)(*itr)); - } - - // CombatStop() method is removing all attackers from the AttackerSet - // That is why it must be AFTER building current set of attackers - _player->CombatStop(); - _player->getHostileRefManager().setOnlineOfflineState(false); - _player->RemoveAllAurasOnDeath(); - _player->SetPvPDeath(!aset.empty()); - _player->KillPlayer(); - _player->BuildPlayerRepop(); - _player->RepopAtGraveyard(); - - // give honor to all attackers from set like group case - for (std::set<Player*>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr) - (*itr)->RewardHonor(_player, aset.size()); - - // give bg rewards and update counters like kill by first from attackers - // this can't be called for all attackers. - if (!aset.empty()) - if (Battleground* bg = _player->GetBattleground()) - bg->HandleKillPlayer(_player, *aset.begin()); - } else if (_player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION)) { // this will kill character by SPELL_AURA_SPIRIT_OF_REDEMPTION @@ -550,7 +517,7 @@ void WorldSession::LogoutPlayer(bool Save) ///- empty buyback items and save the player in the database // some save parts only correctly work in case player present in map/player_lists (pets, etc) - if (Save) + if (save) { uint32 eslot; for (int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; ++j) diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 70a405fd808..96b766fdf74 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -258,7 +258,7 @@ class WorldSession return (_logoutTime > 0 && currTime >= _logoutTime + 20); } - void LogoutPlayer(bool Save); + void LogoutPlayer(bool save); void KickPlayer(); void QueuePacket(WorldPacket* new_packet); diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp index d0a83e4322e..a9b41b719f7 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp @@ -27,9 +27,10 @@ EndScriptData */ #include "ScriptedCreature.h" #define SPELL_SHADOWFLAME 22539 -#define SPELL_WINGBUFFET 18500 +#define SPELL_WINGBUFFET 23339 #define SPELL_SHADOWOFEBONROC 23340 -#define SPELL_HEAL 41386 //Thea Heal spell of his Shadow +#define SPELL_HEAL 41386 //The Heal spell of his Shadow +#define SPELL_THRASH 3391 class boss_ebonroc : public CreatureScript { @@ -49,6 +50,7 @@ public: uint32 WingBuffet_Timer; uint32 ShadowOfEbonroc_Timer; uint32 Heal_Timer; + uint32 Thrash_Timer; void Reset() { @@ -56,6 +58,7 @@ public: WingBuffet_Timer = 30000; ShadowOfEbonroc_Timer = 45000; Heal_Timer = 1000; + Thrash_Timer = 10000; } void EnterCombat(Unit* /*who*/) @@ -75,6 +78,13 @@ public: ShadowFlame_Timer = urand(12000, 15000); } else ShadowFlame_Timer -= diff; + //Thrash Timer + if (Thrash_Timer <= diff) + { + DoCast(me->getVictim(), SPELL_THRASH); + Thrash_Timer = urand(10000, 15000); + } else Thrash_Timer -= diff; + //Wing Buffet Timer if (WingBuffet_Timer <= diff) { diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 10ff16b5ddd..ce23f4ca4f6 100644 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -124,8 +124,9 @@ bool MySQLConnection::Open() { sLog->outInfo(LOG_FILTER_SQL, "MySQL client library: %s", mysql_get_client_info()); sLog->outInfo(LOG_FILTER_SQL, "MySQL server ver: %s ", mysql_get_server_info(m_Mysql)); - if (mysql_get_server_version(m_Mysql) != mysql_get_client_version()) - sLog->outInfo(LOG_FILTER_SQL, "[WARNING] MySQL client/server version mismatch; may conflict with behaviour of prepared statements."); + // MySQL version above 5.1 IS required in both client and server and there is no known issue with different versions above 5.1 + // if (mysql_get_server_version(m_Mysql) != mysql_get_client_version()) + // sLog->outInfo(LOG_FILTER_SQL, "[WARNING] MySQL client/server version mismatch; may conflict with behaviour of prepared statements."); } sLog->outInfo(LOG_FILTER_SQL, "Connected to MySQL database at %s", m_connectionInfo.host.c_str()); |