Skip to content

Commit

Permalink
chore: improve gossip menu options and icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Helias committed Sep 29, 2024
1 parent f687038 commit 1efbc92
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
17 changes: 5 additions & 12 deletions data/sql/db-world/as_2024_03_17_00.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ DELETE FROM `creature_template` WHERE `entry` = @entry;
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `speed_swim`, `speed_flight`, `detection_range`, `scale`, `rank`, `dmgschool`, `DamageModifier`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `spell_school_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(@entry, 0, 0, 0, 0, 0, @name, '', '', 0, 80, 80, 2, 35, 1, 1, 1.14286, 1, 1, 20, 1, 1, 0, 1, 1, 1, 1, 1, 1, 131078, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 1, 1, 1, 0, 0, 1, 138936390, 0, 0, 'npc_solo3v3', '12340');


DELETE FROM `creature_template_model` WHERE `CreatureID` = @entry;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
(@entry, 0, @CreatureDisplayID, 1, 1, 0);

-- npc text (MCH on):
SET @entryNpcText1 := 1000003;
SET @text1 := ' |TInterface/ICONS/achievement_bg_killXEnemies_generalsroom:25|t$B Solo 3v3 Arena$B$B Melee Caster Healer [|cff00ff00on|r]';
DELETE FROM `npc_text` WHERE `ID` = @entryNpcText1;
INSERT INTO `npc_text` (`ID`, `text0_0`) VALUES (@entryNpcText1, @text1);

-- npc text (MCH: off):
SET @entryNpcText2 := 1000004;
SET @text2 := ' |TInterface/ICONS/achievement_bg_killXEnemies_generalsroom:25|t$B Solo 3v3 Arena$B$B Melee Caster Healer [|cffff0000off|r]';
DELETE FROM `npc_text` WHERE `ID` = @entryNpcText2;
INSERT INTO `npc_text` (`ID`, `text0_0`) VALUES (@entryNpcText2, @text2);
-- npc text
SET @npc_text_3v3_soloq := "This NPC enables you to join 3v3soloQ unrated arenas, create a 3v3soloQ arena team, and join 3v3soloQ rated arenas.$B$BIf you prefer not to interact with the NPC, you can use the following commands to join or create the arena:$B$B.qsolo rated$B$B.qsolo unrated$B$BNote that if you don’t already have a 3v3soloQ arena team, using .qsolo rated will automatically create one for you.";
DELETE FROM `npc_text` WHERE `ID` = 1000004;
INSERT INTO `npc_text` (`id`, `text0_0`, `text0_1`, `Probability0`) VALUES
(1000004, @npc_text_3v3_soloq, @npc_text_3v3_soloq, 1);

-- Command
DELETE FROM `command` WHERE `name` IN ('qsolo', 'qsolo rated', 'qsolo unrated', 'testqsolo');
Expand Down
29 changes: 17 additions & 12 deletions src/solo3v3_sc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,31 @@ bool NpcSolo3v3::OnGossipHello(Player* player, Creature* creature)
AddGossipItemFor(player, GOSSIP_ICON_CHAT, infoQueue.str().c_str(), GOSSIP_SENDER_MAIN, 0);

if (player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO))
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_2v2_7:30|t Leave Solo queue", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_LEAVE_QUEUE, "Are you sure you want to remove the solo queue?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_2v2_7:30:30:-18:0|t Leave Solo queue", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_LEAVE_QUEUE, "Are you sure you want to remove the solo queue?", 0, false);

if (!player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO))
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_3v3_5:30|t Queue up for 3vs3 Arena Solo (UnRated)\n", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_JOIN_QUEUE_ARENA_UNRATED);
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_3v3_5:30:30:-18:0|t Queue 3v3soloQ (UnRated)\n", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_JOIN_QUEUE_ARENA_UNRATED);

if (!player->GetArenaTeamId(ARENA_SLOT_SOLO_3v3))
{
uint32 cost = sConfigMgr->GetOption<uint32>("Solo.3v3.Cost", 1);
if (player->IsPvP())
cost = 0;

AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_2v2_7:30|t Create new Solo arena team", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_CREATE_ARENA_TEAM, "Create new solo arena team?", cost, false);
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_2v2_7:30:30:-18:0|t Create new Solo arena team", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_CREATE_ARENA_TEAM, "Create new solo arena team?", cost, false);
}
else
{
if (!player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO))
{
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_3v3_5:30|t Queue up for 3vs3 Arena Solo (Rated)\n", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_JOIN_QUEUE_ARENA_RATED);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "|TInterface/ICONS/Achievement_Arena_2v2_7:30|t Disband Arena team", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_DISBAND_ARENATEAM, "Are you sure?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_3v3_5:30:30:-18:0|t Queue 3v3soloQ (Rated)\n", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_JOIN_QUEUE_ARENA_RATED);
AddGossipItemFor(player, GOSSIP_ICON_DOT, "|TInterface/ICONS/Achievement_Arena_2v2_7:30:30:-18:0|t Disband Arena team", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_DISBAND_ARENATEAM, "Are you sure?", 0, false);
}

AddGossipItemFor(player, GOSSIP_ICON_CHAT, "|TInterface/ICONS/INV_Misc_Coin_01:30|t Show statistics", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_GET_STATISTICS);
AddGossipItemFor(player, GOSSIP_ICON_DOT, "|TInterface/ICONS/INV_Misc_Coin_01:30:30:-18:0|t Show statistics", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_GET_STATISTICS);
}

AddGossipItemFor(player, GOSSIP_ICON_CHAT, "|TInterface/ICONS/INV_Misc_Coin_03:30|t How to Use NPC?", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_SCRIPT_INFO);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "|TInterface/ICONS/inv_misc_questionmark:30:30:-20:0|t Help", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_SCRIPT_INFO);

SendGossipMenuFor(player, 60015, creature->GetGUID());

Expand Down Expand Up @@ -197,14 +197,19 @@ bool NpcSolo3v3::OnGossipSelect(Player* player, Creature* creature, uint32 /*sen

case NPC_3v3_ACTION_SCRIPT_INFO:
{
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Click on Create new 3v3 SoloQ Arena team", GOSSIP_SENDER_MAIN, action);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Join 3v3 SoloQ Arena and ready!", GOSSIP_SENDER_MAIN, action);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Enjoy!", GOSSIP_SENDER_MAIN, action);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<- Back", GOSSIP_SENDER_MAIN, 7);
SendGossipMenuFor(player, 68, creature->GetGUID());

AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<- Back", GOSSIP_SENDER_MAIN, NPC_3v3_ACTION_MAIN_MENU);
SendGossipMenuFor(player, NPC_TEXT_3v3, creature->GetGUID());
return true;
}
break;

case NPC_3v3_ACTION_MAIN_MENU:
{
OnGossipHello(player, creature);
return true;
}

}

OnGossipHello(player, creature);
Expand Down
3 changes: 3 additions & 0 deletions src/solo3v3_sc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
#include "Battleground.h"
#include "solo3v3.h"

#define NPC_TEXT_3v3 1000004

enum Npc3v3Actions {
NPC_3v3_ACTION_MAIN_MENU = 0,
NPC_3v3_ACTION_CREATE_ARENA_TEAM = 1,
NPC_3v3_ACTION_JOIN_QUEUE_ARENA_RATED = 2,
NPC_3v3_ACTION_LEAVE_QUEUE = 3,
Expand Down

0 comments on commit 1efbc92

Please sign in to comment.