Skip to content

Commit 301253b

Browse files
authored
Merge pull request #19 from azerothcore/sudlud-pach-42-3
2 parents 0ca7019 + f1567a4 commit 301253b

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed
File renamed without changes.
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
-- The example of the creature --
22
DELETE FROM `creature_template` WHERE `entry`=55005;
3-
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `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
4-
(55005, 0, 0, 0, 0, 0, 1525, 0, 0, 0, 'Guild House', 'AzerothCore', NULL, 0, 80, 80, 0, 35, 1, 1, 1.14286, 1, 1, 20, 1, 0, 0, 1, 2000, 2000, 1, 1, 2, 0, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 50, 50, 1, 1, 0, 0, 1, 0, 0, 0, 'guildmaster', 12340);
3+
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
4+
(55005, 0, 0, 0, 0, 0, 'Guild House', 'AzerothCore', NULL, 0, 80, 80, 0, 35, 1, 1, 1.14286, 1, 1, 20, 1, 0, 0, 1, 2000, 2000, 1, 1, 2, 0, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 50, 50, 1, 1, 0, 0, 1, 0, 0, 0, 'guildmaster', 12340);
5+
6+
-- NPC MODEL
7+
DELETE FROM `creature_template_model` WHERE `CreatureID` = 55005;
8+
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
9+
(55005, 0, 1525, 1, 1, 0);
510

611
-- All creatures for guild houses --
712
DELETE FROM `creature` WHERE id1=55005;

src/guildmaster.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
#include "DatabaseEnv.h"
12
#include "Player.h"
3+
#include "ScriptedGossip.h"
24
#include "ScriptMgr.h"
35
#include "World.h"
4-
#include "DatabaseEnv.h"
5-
#include "ScriptedGossip.h"
66

77
#define COST_GH_BUY 1000 //1000 g.
88
#define COST_GH_SELL 500 //500 g.
@@ -161,9 +161,7 @@ class guildmaster : public CreatureScript
161161
}
162162

163163
if (isPlayerHasGuildhouse(player, _creature, true))
164-
{
165164
return;
166-
}
167165

168166
QueryResult result;
169167
//check if somebody already occupied this GH
@@ -217,9 +215,7 @@ class guildmaster : public CreatureScript
217215
break;
218216
default:
219217
if (action > OFFSET_SHOWBUY_FROM)
220-
{
221218
showBuyList(player, _creature, action - OFFSET_SHOWBUY_FROM);
222-
}
223219
else if (action > OFFSET_GH_ID_TO_ACTION)
224220
{
225221
CloseGossipMenuFor(player);
@@ -243,13 +239,9 @@ class guildmaster : public CreatureScript
243239
if (isPlayerGuildLeader(player))
244240
{
245241
if (isPlayerHasGuildhouse(player, _creature))
246-
{
247242
AddGossipItemFor(player, ICON_GOSSIP_GOLD, MSG_GOSSIP_SELL, GOSSIP_SENDER_MAIN, ACTION_SELL_GUILDHOUSE, MSG_SELL_CONFIRM, 0, false);
248-
}
249243
else
250-
{
251244
AddGossipItemFor(player, ICON_GOSSIP_GOLD, MSG_GOSSIP_BUY, GOSSIP_SENDER_MAIN, ACTION_SHOW_BUYLIST);
252-
}
253245
}
254246

255247
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());

0 commit comments

Comments
 (0)