Skip to content

Commit 8535d97

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-skip-dk
2 parents 518dca7 + 0672ad5 commit 8535d97

51 files changed

Lines changed: 1925 additions & 1334 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
--
2+
SET @SPAWN_GROUP_ID := 357; -- 3
3+
4+
-- Hellfire Sentry
5+
DELETE FROM `creature_text` WHERE `CreatureID` = 17517;
6+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
7+
(17517,0,0,"We are the true Horde!",12,0,100,0,0,0,16697,0,"Hellfire Sentry"),
8+
(17517,0,1,"For Kargath! For Victory!",12,0,100,0,0,0,16698,0,"Hellfire Sentry"),
9+
(17517,0,2,"Gakarah ma!",12,0,100,0,0,0,16699,0,"Hellfire Sentry"),
10+
(17517,0,3,"The blood is our power! ",12,0,100,0,0,0,16700,0,"Hellfire Sentry"),
11+
(17517,0,4,"Lok'tar Illadari!\n",12,0,100,0,0,0,16701,0,"Hellfire Sentry"),
12+
(17517,0,5,"This world is OURS!",12,0,100,0,0,0,16702,0,"Hellfire Sentry"),
13+
(17517,0,6,"Lok narash!",12,0,100,0,0,0,16703,0,"Hellfire Sentry");
14+
15+
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 17517;
16+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 17517 AND `source_type` = 0;
17+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
18+
(17517,0,0,0,4,0,15,0,0,0,0,0,0,1,0,0,1,0,0,0,7,0,0,0,0,0,0,0,0,"Hellfire Sentry - On Aggro - Say Line 0"),
19+
(17517,0,1,0,0,0,100,0,5000,10000,20000,30000,0,11,30621,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Hellfire Sentry - In Combat - Cast 'Kidney Shot'");
20+
21+
-- Vazruden the Herald
22+
UPDATE `creature_template` SET `speed_walk` = 4, `speed_run` = 2.57143 WHERE `entry` = 18435;
23+
24+
UPDATE `creature` SET `spawntimesecs` = 86400 WHERE `id` = 17307;
25+
26+
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |512 WHERE `entry` IN (17307,18435);
27+
28+
-- Nazan
29+
UPDATE `creature_template` SET `speed_walk` = 4, `speed_run` = 2.57143, `flags_extra` = `flags_extra` |512, `ScriptName` = '' WHERE `entry` IN (17536,18432);
30+
31+
UPDATE `creature_model_info` SET `CombatReach` = 10 WHERE `DisplayID` = 18812;
32+
33+
-- Vazruden
34+
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.42857, `BaseAttackTime` = 2400 WHERE `entry` = 18434;
35+
36+
-- Misc
37+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 30693;
38+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
39+
(13,1,30693,0,0,31,0,3,17536,0,0,0,0,"","Group 0: Spell 'Call Nazan' (Effect 0) targets creature 'Nazan'");
40+
41+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
42+
'spell_vazruden_call_nazan',
43+
'spell_vazruden_cone_of_fire',
44+
'spell_vazruden_fireball',
45+
'spell_vazruden_summon_vazruden');
46+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
47+
(30693, 'spell_vazruden_call_nazan'),
48+
(30926, 'spell_vazruden_cone_of_fire'),
49+
(36921, 'spell_vazruden_cone_of_fire'),
50+
(30691, 'spell_vazruden_fireball'),
51+
(32491, 'spell_vazruden_fireball'),
52+
(33793, 'spell_vazruden_fireball'),
53+
(33794, 'spell_vazruden_fireball'),
54+
(34653, 'spell_vazruden_fireball'),
55+
(36920, 'spell_vazruden_fireball'),
56+
(30717, 'spell_vazruden_summon_vazruden');
57+
58+
DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (30926,34653);
59+
60+
UPDATE `gameobject_template_addon` SET `faction` = 14 WHERE `entry` = 182533;
61+
62+
UPDATE `gameobject_template` SET `ScriptName` = 'go_vazruden_liquid_fire' WHERE `entry` IN (180125,181890,182533);
63+
64+
-- Spawn groups
65+
UPDATE `spawn_group` SET `groupId` = @SPAWN_GROUP_ID WHERE `spawnId` = 202693 AND `spawnType` = 0;
66+
UPDATE `spawn_group` SET `groupId` = @SPAWN_GROUP_ID WHERE `spawnId` = 202705 AND `spawnType` = 0;
67+
UPDATE `spawn_group` SET `groupId` = @SPAWN_GROUP_ID WHERE `spawnId` = 202706 AND `spawnType` = 0;
68+
69+
DELETE FROM `spawn_group_template` WHERE `groupId` = 51;
70+
DELETE FROM `spawn_group_template` WHERE `groupId` = @SPAWN_GROUP_ID;
71+
INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
72+
(@SPAWN_GROUP_ID+0,"Hellfire Ramparts - Vazruden the Herald",0);
73+
74+
DELETE FROM `instance_spawn_groups` WHERE `instanceMapId` = 543 AND `bossStateId` = 3;
75+
DELETE FROM `instance_spawn_groups` WHERE `instanceMapId` = 543 AND `bossStateId` = 2 AND `spawnGroupId` = 51;
76+
DELETE FROM `instance_spawn_groups` WHERE `instanceMapId` = 543 AND `bossStateId` = 2 AND `spawnGroupId` = @SPAWN_GROUP_ID;
77+
78+
INSERT INTO `instance_spawn_groups` (`instanceMapId`, `bossStateId`, `bossStates`, `spawnGroupId`, `flags`) VALUES
79+
(543,2,23,@SPAWN_GROUP_ID+0,1);

src/server/game/Battlegrounds/ArenaTeam.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,13 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid)
107107
playerClass = player->GetClass();
108108
playerName = player->GetName();
109109
}
110-
else
110+
else if (CharacterCacheEntry const* characterInfo = sCharacterCache->GetCharacterCacheByGuid(playerGuid))
111111
{
112-
CharacterCacheEntry const* cInfo = sCharacterCache->GetCharacterCacheByGuid(playerGuid);
113-
if (!cInfo)
114-
return false;
115-
116-
playerName = cInfo->Name;
117-
playerClass = cInfo->Class;
112+
playerName = characterInfo->Name;
113+
playerClass = characterInfo->Class;
118114
}
115+
else
116+
return false;
119117

120118
// Check if player is already in a similar arena team
121119
if ((player && player->GetArenaTeamId(GetSlot())) || sCharacterCache->GetCharacterArenaTeamIdByGuid(playerGuid, GetType()) != 0)

src/server/game/Entities/Item/Item.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemId, Player const* owne
286286
SetUInt32Value(ITEM_FIELD_DURABILITY, itemProto->MaxDurability);
287287

288288
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
289-
SetSpellCharges(i, itemProto->Spells[i].SpellCharges);
289+
SetSpellCharges(i, itemProto->Effects[i].Charges);
290290

291291
SetUInt32Value(ITEM_FIELD_DURATION, itemProto->Duration);
292292
SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0);
@@ -454,7 +454,7 @@ bool Item::LoadFromDB(ObjectGuid::LowType guid, ObjectGuid owner_guid, Field* fi
454454
if (Optional<int32> charges = Trinity::StringTo<int32>(tokens[i]))
455455
SetSpellCharges(i, *charges);
456456
else
457-
TC_LOG_ERROR("entities.item", "Invalid charge info '{}' for item {}, charge data not loaded.", std::string(tokens[i]), GetGUID().ToString());
457+
TC_LOG_ERROR("entities.item", "Invalid charge info '{}' for item {}, charge data not loaded.", tokens[i], GetGUID());
458458
}
459459
}
460460

src/server/game/Entities/Item/ItemTemplate.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ void ItemTemplate::_LoadTotalAP()
147147
totalAP += ItemStat[i].ItemStatValue;
148148

149149
// some items can have equip spells with +AP
150-
for (uint32 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
151-
if (Spells[i].SpellId > 0 && Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_EQUIP)
152-
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(Spells[i].SpellId))
150+
for (ItemEffect const& itemEffect : Effects)
151+
if (itemEffect.SpellID > 0 && itemEffect.TriggerType == ITEM_SPELLTRIGGER_ON_EQUIP)
152+
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemEffect.SpellID))
153153
for (SpellEffectInfo const& effect : spellInfo->GetEffects())
154154
if (effect.IsAura(SPELL_AURA_MOD_ATTACK_POWER))
155155
totalAP += effect.CalcValue();
@@ -235,12 +235,12 @@ WorldPacket ItemTemplate::BuildQueryData(LocaleConstant loc) const
235235

236236
for (uint8 s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
237237
{
238-
response.Stats.Spells[s].SpellId = Spells[s].SpellId;
239-
response.Stats.Spells[s].SpellTrigger = Spells[s].SpellTrigger;
240-
response.Stats.Spells[s].SpellCharges = Spells[s].SpellCharges;
241-
response.Stats.Spells[s].SpellCooldown = Spells[s].SpellCooldown;
242-
response.Stats.Spells[s].SpellCategory = Spells[s].SpellCategory;
243-
response.Stats.Spells[s].SpellCategoryCooldown = Spells[s].SpellCategoryCooldown;
238+
response.Stats.Spells[s].SpellId = Effects[s].SpellID;
239+
response.Stats.Spells[s].SpellTrigger = Effects[s].TriggerType;
240+
response.Stats.Spells[s].SpellCharges = Effects[s].Charges;
241+
response.Stats.Spells[s].SpellCooldown = Effects[s].CoolDownMSec;
242+
response.Stats.Spells[s].SpellCategory = Effects[s].SpellCategoryID;
243+
response.Stats.Spells[s].SpellCategoryCooldown = Effects[s].CategoryCoolDownMSec;
244244
}
245245

246246
response.Stats.Bonding = Bonding;

src/server/game/Entities/Item/ItemTemplate.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -574,15 +574,16 @@ struct _ItemStat
574574
uint32 ItemStatType = 0;
575575
int32 ItemStatValue = 0;
576576
};
577-
struct _Spell
577+
578+
struct ItemEffect
578579
{
579-
int32 SpellId = 0; // id from Spell.dbc
580-
uint32 SpellTrigger = 0;
581-
int32 SpellCharges = 0;
580+
int32 SpellID = 0; // id from Spell.dbc
581+
uint32 TriggerType = 0;
582+
int32 Charges = 0;
582583
float SpellPPMRate = 0.0f;
583-
int32 SpellCooldown = -1;
584-
uint32 SpellCategory = 0; // id from SpellCategory.dbc
585-
int32 SpellCategoryCooldown = -1;
584+
int32 CoolDownMSec = -1;
585+
uint32 SpellCategoryID = 0; // id from SpellCategory.dbc
586+
int32 CategoryCoolDownMSec = -1;
586587
};
587588

588589
struct _Socket
@@ -644,7 +645,7 @@ struct TC_GAME_API ItemTemplate
644645
uint32 Delay;
645646
uint32 AmmoType;
646647
float RangedModRange;
647-
std::array<_Spell, MAX_ITEM_PROTO_SPELLS> Spells;
648+
std::array<ItemEffect, MAX_ITEM_PROTO_SPELLS> Effects;
648649
uint32 Bonding;
649650
std::string Description;
650651
uint32 PageText;

0 commit comments

Comments
 (0)