Skip to content

Commit

Permalink
Code cleanups and missing SQL inclusions.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchyDev committed Oct 18, 2023
1 parent f8b73dd commit 010f1a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions data/sql/db-world/base/tos_world_base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`,
DELETE FROM `npc_text` WHERE `ID`=441254;
INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES (441254, 'Congratulations, $n!|n|nYou have triumphed in the Trial of Strength, proving your mettle and determination. Your strength and skill have shone brightly, and your name will be celebrated in the annals of our arena\'s history.|n|nWhat would you like to do now?', NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL);

DELETE FROM `gameobject_template` WHERE `entry`=441250;
INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `size`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `Data6`, `Data7`, `Data8`, `Data9`, `Data10`, `Data11`, `Data12`, `Data13`, `Data14`, `Data15`, `Data16`, `Data17`, `Data18`, `Data19`, `Data20`, `Data21`, `Data22`, `Data23`, `AIName`, `ScriptName`, `VerifiedBuild`) VALUES (441250, 3, 259, 'Arena Master\'s Lootbox', '', '', '', 1.25, 57, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 1);

DELETE FROM `gameobject_template` WHERE `entry`=441251;
INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `size`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `Data6`, `Data7`, `Data8`, `Data9`, `Data10`, `Data11`, `Data12`, `Data13`, `Data14`, `Data15`, `Data16`, `Data17`, `Data18`, `Data19`, `Data20`, `Data21`, `Data22`, `Data23`, `AIName`, `ScriptName`, `VerifiedBuild`) VALUES (441251, 5, 3272, 'Arena Master\'s Lootbox Beam', '', '', '', 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 1);


CREATE TABLE IF NOT EXISTS `tos_reward_template` (
`id` int DEFAULT NULL,
Expand Down
1 change: 1 addition & 0 deletions src/TrialOfStrength.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
enum ToSConstants {
TOS_MAP_ID = 44,
TOS_NPC_ARENA_MASTER = 441250,
TOS_SPELL_TELEPORT_VISUAL = 64446,

TOS_DATA_ENCOUNTER_START = 1,
TOS_DATA_ENCOUNTER_CURRENT_WAVE = 2,
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/ToSInstanceScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void ToSInstanceScript::SpawnNextWave(ToSWaveTemplate* waveTemplate = nullptr)
if (currentSubGroup == 1)
summon->SetFaction(FACTION_FRIENDLY);

summon->CastSpell(summon, TOS_SPELL_TELEPORT_VISUAL);
MakeEntrance(summon);
}

Expand Down Expand Up @@ -264,7 +265,7 @@ void ToSInstanceScript::RelocateArenaMaster(bool returning)
return;
}

arenaMaster->CastSpell(arenaMaster, 64446);
arenaMaster->CastSpell(arenaMaster, TOS_SPELL_TELEPORT_VISUAL);

if (returning)
{
Expand Down Expand Up @@ -449,7 +450,7 @@ void ToSInstanceScript::PopulateRewardChest()
return;
}

rewardBeam = instance->SummonGameObject(177705, *tempPos);
rewardBeam = instance->SummonGameObject(441251, *tempPos);
if (!rewardBeam)
{
rewardBeam->DespawnOrUnsummon();
Expand Down

0 comments on commit 010f1a5

Please sign in to comment.