aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql112
-rw-r--r--sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql44
-rw-r--r--sql/updates/world/2012_04_23_04_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2012_04_23_05_world_creature_loot_template.sql3
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundSA.cpp10
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundSA.h89
6 files changed, 234 insertions, 26 deletions
diff --git a/sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql b/sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql
new file mode 100644
index 00000000000..6ea44d92722
--- /dev/null
+++ b/sql/updates/world/2012_04_23_02_world_prospecting_loot_template.sql
@@ -0,0 +1,112 @@
+SET @TinRef := 13000;
+SET @TBC1 := @TinRef+1;
+SET @TBC2 := @TinRef+2;
+SET @WOTLK1 := @TinRef+3;
+SET @WOTLK2 := @TinRef+4;
+SET @WOTLK3 := @TinRef+5;
+
+SET @Copper := 2770;
+SET @Tin := 2771;
+SET @Iron := 2772;
+SET @Mithril := 3858;
+SET @Thorium := 10620;
+SET @FelIron := 23424;
+SET @Adamantite := 23425;
+SET @Cobalt := 36909;
+SET @Saronite := 36912;
+SET @Titanium := 36910;
+
+-- Reference Loot Templates
+DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @TinRef AND @TinRef+5;
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Stupid Tin
+(@TinRef,1529,0,1,1,1,1), -- Jade
+(@TinRef,3864,0,1,1,1,1), -- Citrine
+(@TinRef,7909,0,1,1,1,1), -- Aquamarine
+-- TBC Greens
+(@TBC1,21929,0,1,1,1,2), -- Flame Spessarite
+(@TBC1,23077,0,1,1,1,2), -- Blood Garnet
+(@TBC1,23079,0,1,1,1,2), -- Deep Peridot
+(@TBC1,23107,0,1,1,1,2), -- Shadow Draenite
+(@TBC1,23112,0,1,1,1,2), -- Golden Draenite
+(@TBC1,23117,0,1,1,1,2), -- Azure Moonstone
+-- TBC Blues
+(@TBC2,23436,0,1,1,1,1), -- Living Ruby
+(@TBC2,23437,0,1,1,1,1), -- Talasite
+(@TBC2,23438,0,1,1,1,1), -- Star of Elune
+(@TBC2,23439,0,1,1,1,1), -- Noble Topaz
+(@TBC2,23440,0,1,1,1,1), -- Dawnstone
+(@TBC2,23441,0,1,1,1,1), -- Nightseye
+-- WOTLK Greens
+(@WOTLK1,36917,0,1,1,1,2), -- Bloodstone
+(@WOTLK1,36920,0,1,1,1,2), -- Sun Crystal
+(@WOTLK1,36923,0,1,1,1,2), -- Chalcedony
+(@WOTLK1,36926,0,1,1,1,2), -- Shadow Crystal
+(@WOTLK1,36929,0,1,1,1,2), -- Huge Citrine
+(@WOTLK1,36932,0,1,1,1,2), -- Dark Jade
+-- WOTLK Blues
+(@WOTLK2,36918,0,1,1,1,2), -- Scarlet Ruby
+(@WOTLK2,36921,0,1,1,1,2), -- Autumn's Glow
+(@WOTLK2,36924,0,1,1,1,2), -- Sky Sapphire
+(@WOTLK2,36927,0,1,1,1,2), -- Twilight Opal
+(@WOTLK2,36930,0,1,1,1,2), -- Monarch Topaz
+(@WOTLK2,36933,0,1,1,1,2), -- Forest Emerald
+-- WOTLK Epics
+(@WOTLK3,36919,0,1,1,1,1), -- Cardinal Ruby
+(@WOTLK3,36922,0,1,1,1,1), -- King's Amber
+(@WOTLK3,36925,0,1,1,1,1), -- Majestic Zircon
+(@WOTLK3,36928,0,1,1,1,1), -- Dreadstone
+(@WOTLK3,36931,0,1,1,1,1), -- Ametrine
+(@WOTLK3,36934,0,1,1,1,1); -- Eye of Zul
+-- --------------------------------------------------------
+-- Prospecting Loot Templates
+DELETE FROM `prospecting_loot_template` WHERE `entry` IN (@Copper,@Tin,@Iron,@Mithril,@Thorium,@FelIron,@Adamantite,@Cobalt,@Saronite,@Titanium);
+INSERT INTO `prospecting_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Copper Ore
+(@Copper,774,0,1,1,1,1), -- Malachite
+(@Copper,818,0,1,1,1,1), -- Tigerseye
+(@Copper,1210,10,1,0,1,1), -- Shadowgem
+-- Tin Ore
+(@Tin,1210,0,1,1,1,2), -- Shadowgem
+(@Tin,1705,0,1,1,1,2), -- Lesser Moonstone
+(@Tin,1206,0,1,1,1,2), -- Moss Agate
+(@Tin,1,10,1,0,-@TinRef,1), -- One Rare gem chance
+-- Iron Ore
+(@Iron,1529,30,1,1,1,2), -- Jade
+(@Iron,1705,30,1,1,1,2), -- Lesser Moonstone
+(@Iron,3864,30,1,1,1,2), -- Citrine
+(@Iron,7909,5,1,1,1,1), -- Aquamarine
+(@Iron,7910,5,1,1,1,1), -- Star Ruby
+-- Mithril Ore
+(@Mithril,3864,30,1,1,1,2), -- Citrine
+(@Mithril,7909,30,1,1,1,2), -- Aquamarine
+(@Mithril,7910,30,1,1,1,2), -- Star Ruby
+(@Mithril,12361,2.5,1,1,1,1), -- Blue Sapphire
+(@Mithril,12364,2.5,1,1,1,1), -- Huge Emerald
+(@Mithril,12799,2.5,1,1,1,1), -- Large Opal
+(@Mithril,12800,2.5,1,1,1,1), -- Azerothian Diamond
+-- Thorium Ore
+(@Thorium,7910,30,1,1,1,2), -- Star Ruby
+(@Thorium,12361,15,1,1,1,2), -- Blue Sapphire
+(@Thorium,12364,15,1,1,1,2), -- Huge Emerald
+(@Thorium,12799,15,1,1,1,2), -- Large Opal
+(@Thorium,12800,15,1,1,1,2), -- Azerothian Diamond
+(@Thorium,1,10,1,1,-@TBC1,1), -- one from TBC Greens
+-- Fel Iron Ore
+(@FelIron,1,95,1,1,-@TBC1,1), -- One from TBC Greens
+(@FelIron,2,05,1,1,-@TBC2,1), -- One from TBC Blues
+-- Adamantite Ore
+(@Adamantite,24243,100,1,0,1,1), -- Adamantite Powder
+(@Adamantite,1,100,1,1,-@TBC1,1), -- One from TBC Greens
+(@Adamantite,2, 10,1,1,-@TBC2,1), -- One from TBC Blues
+-- Cobalt Ore
+(@Cobalt,1,95,1,1,-@WOTLK1,1), -- One from WOTLK Greens
+(@Cobalt,2,05,1,1,-@WOTLK2,1), -- One from WOTLK Blues
+-- Saronite Ore
+(@Saronite,1,85,1,1,-@WOTLK1,2), -- One from WOTLK Greens
+(@Saronite,2,15,1,1,-@WOTLK2,1), -- One from WOTLK Blues
+-- Titanium Ore
+(@Titanium,46849,75,1,0,1,1), -- Titanium Powder
+(@Titanium,1,75,1,1,-@WOTLK1,2), -- Two from WOTLK Greens
+(@Titanium,2,25,1,1,-@WOTLK2,1), -- One from WOTLK Blues
+(@Titanium,3,20,1,0,-@WOTLK3,1); -- One from WOTLK Epics
diff --git a/sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql b/sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql
new file mode 100644
index 00000000000..a1aa9e070f2
--- /dev/null
+++ b/sql/updates/world/2012_04_23_03_world_skinning_loot_template.sql
@@ -0,0 +1,44 @@
+UPDATE `creature_template` SET `skinloot`=entry WHERE `entry` IN (30260, 32517, 27641, 28860);
+UPDATE `creature_template` SET `skinloot`=70202 WHERE `entry` IN (25774,29693);
+UPDATE `creature_template` SET `skinloot`=70203 WHERE `entry`=28257;
+UPDATE `creature_template` SET `skinloot`=70207 WHERE `entry`=34137;
+UPDATE `creature_template` SET `skinloot`=70208 WHERE `entry` IN (32572,25448,25716,25713);
+UPDATE `creature_template` SET `skinloot`=70210 WHERE `entry` IN (33528,40419,26723,31134,36891);
+UPDATE `creature_template` SET `skinloot`=70211 WHERE `entry` IN (28847,30206,29875,29931,28203,30432);
+UPDATE `creature_template` SET `skinloot`=70212 WHERE `entry` IN (27645,32377,29838,26628,26622,32490,38453,32485,26633,32400,32361,29768,29735,26641,27644,27642,26735,26730,26722,33776,35189,26716,26672,29664,29774);
+UPDATE `creature_template` SET `skinloot`=70213 WHERE `entry` IN (27483,29312);
+UPDATE `creature_template` SET `skinloot`=70214 WHERE `entry` IN (37217,34564);
+UPDATE `creature_template` SET `skinloot`=27641 WHERE `entry` IN (31385,34269,34270,27641,30905,30353);
+
+DELETE FROM `skinning_loot_template` WHERE entry IN (30260,32517,70212,70213,70214,28860,27641);
+INSERT INTO `skinning_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+-- Stoic Mammoth
+(30260,33568,100,0,1,3), -- Borean Leather
+(30260,42542,-50,0,1,1), -- Stoic Mammoth Hide
+-- Loque'nahak
+(32517,33568,0,1,1,3), -- Borean Leather
+(32517,44128,2,1,1,1), -- Arctic Fur
+(32517,44687,100,0,1,1), -- Loque'Nahak's Pelt
+-- skinloot 70212
+(70212,33568,0,1,1,3), -- Borean Leather
+(70212,44128,1,1,1,1), -- Arctic Fur
+-- skinloot 70213
+(70213,33568,0,1,5,12), -- Borean Leather
+(70213,44128,1,1,1,1), -- Arctic Fur
+-- skinloot 70214
+(70214,33568,0,1,12,16), -- Borean Leather
+(70214,44128,25,1,1,1), -- Arctic Fur
+-- Sartharion
+(28860,33568,0,1,8,12), -- Borean Leather
+(28860,38557,0,1,8,12),-- Icy Dragonscale
+(28860,44128,1,1,1,1), -- Arctic Fur
+-- Centrifuge Construct
+(27641,41337,85,0,1,3), -- Whizzed-Out Gizmo
+(27641,41338,80,0,1,3), -- Sprung Whirlygig
+(27641,39690,15,0,1,3), -- Volatile Blasting Trigger
+(27641,39684,8,0,1,1), -- Hair Trigger
+(27641,36813,8,0,1,3), -- Sprung Sprocket
+(27641,39681,8,0,2,4), -- Handful of Cobalt Bolts
+(27641,49050,2,0,1,1), -- Schematic: Jeeves
+(27641,39682,1,0,1,1), -- Overcharged Capacitor
+(27641,39685,1,0,1,1); -- Indestructible Frame
diff --git a/sql/updates/world/2012_04_23_04_world_creature_loot_template.sql b/sql/updates/world/2012_04_23_04_world_creature_loot_template.sql
new file mode 100644
index 00000000000..94d2b092d12
--- /dev/null
+++ b/sql/updates/world/2012_04_23_04_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- Correct dropchance for Mote of Life, wowhead was wrong (as usual)
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=18.5307 WHERE `entry`=22307 AND `item`=22575;
diff --git a/sql/updates/world/2012_04_23_05_world_creature_loot_template.sql b/sql/updates/world/2012_04_23_05_world_creature_loot_template.sql
new file mode 100644
index 00000000000..ddf0780d362
--- /dev/null
+++ b/sql/updates/world/2012_04_23_05_world_creature_loot_template.sql
@@ -0,0 +1,3 @@
+-- Update the dropchance to 100% if on quest
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-100 WHERE `entry`=21477 AND `item`=31372; -- Rocknail Flayer Carcass
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-100 WHERE `entry`=21478 AND `item`=31373; -- Rocknail Flayer Giblets
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 6d784488aad..977897b8d48 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -534,16 +534,16 @@ void BattlegroundSA::EventPlayerDamagedGO(Player* /*player*/, GameObject* go, ui
if (eventType == go->GetGOInfo()->building.damagedEvent)
{
- uint32 i = GetGateIDFromDestroyEventID(eventType);
+ uint32 i = getGateIdFromDamagedOrDestroyEventId(eventType);
GateStatus[i] = BG_SA_GATE_DAMAGED;
- uint32 uws = GetWorldStateFromGateID(i);
+ uint32 uws = getWorldStateFromGateId(i);
if (uws)
UpdateWorldState(uws, GateStatus[i]);
}
if (eventType == go->GetGOInfo()->building.destroyedEvent)
{
- if (go->GetGOInfo()->building.destroyedEvent == 19837)
+ if (go->GetGOInfo()->building.destroyedEvent == BG_SA_EVENT_ANCIENT_GATE_DESTROYED)
SendWarningToAll(LANG_BG_SA_CHAMBER_BREACHED);
else
SendWarningToAll(LANG_BG_SA_WAS_DESTROYED, go->GetGOInfo()->name.c_str());
@@ -603,7 +603,7 @@ void BattlegroundSA::DemolisherStartState(bool start)
void BattlegroundSA::DestroyGate(Player* player, GameObject* go)
{
- uint32 i = GetGateIDFromDestroyEventID(go->GetGOInfo()->building.destroyedEvent);
+ uint32 i = getGateIdFromDamagedOrDestroyEventId(go->GetGOInfo()->building.destroyedEvent);
if (!GateStatus[i])
return;
@@ -612,7 +612,7 @@ void BattlegroundSA::DestroyGate(Player* player, GameObject* go)
if (g->GetGOValue()->Building.Health == 0)
{
GateStatus[i] = BG_SA_GATE_DESTROYED;
- uint32 uws = GetWorldStateFromGateID(i);
+ uint32 uws = getWorldStateFromGateId(i);
if (uws)
UpdateWorldState(uws, GateStatus[i]);
bool rewardHonor = true;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
index 76a772ff978..2ade101ce54 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
@@ -45,9 +45,30 @@ enum BG_SA_Status
enum BG_SA_GateState
{
- BG_SA_GATE_OK = 1,
- BG_SA_GATE_DAMAGED = 2,
- BG_SA_GATE_DESTROYED = 3
+ BG_SA_GATE_OK = 1,
+ BG_SA_GATE_DAMAGED = 2,
+ BG_SA_GATE_DESTROYED = 3
+};
+
+enum BG_SA_EventIdGate
+{
+ BG_SA_EVENT_GREEN_GATE_DAMAGED = 19041,
+ BG_SA_EVENT_GREEN_GATE_DESTROYED = 19046,
+
+ BG_SA_EVENT_BLUE_GATE_DAMAGED = 19040,
+ BG_SA_EVENT_BLUE_GATE_DESTROYED = 19045,
+
+ BG_SA_EVENT_RED_GATE_DAMAGED = 19042,
+ BG_SA_EVENT_RED_GATE_DESTROYED = 19047,
+
+ BG_SA_EVENT_PURPLE_GATE_DAMAGED = 19048,
+ BG_SA_EVENT_PURPLE_GATE_DESTROYED = 19043,
+
+ BG_SA_EVENT_YELLOW_GATE_DAMAGED = 19049,
+ BG_SA_EVENT_YELLOW_GATE_DESTROYED = 19044,
+
+ BG_SA_EVENT_ANCIENT_GATE_DAMAGED = 19836,
+ BG_SA_EVENT_ANCIENT_GATE_DESTROYED = 19837
};
enum BG_SA_Timers
@@ -443,34 +464,60 @@ class BattlegroundSA : public Battleground
/// Called when a player use a gamobject (relic)
virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
/// Return gate id, relative to bg data, according to gameobject id
- uint32 GetGateIDFromDestroyEventID(uint32 id)
+ uint32 getGateIdFromDamagedOrDestroyEventId(uint32 id)
{
- uint32 i = 0;
switch (id)
{
- case 19046: i = BG_SA_GREEN_GATE; break; //Green gate destroyed
- case 19045: i = BG_SA_BLUE_GATE; break; //blue gate
- case 19047: i = BG_SA_RED_GATE; break; //red gate
- case 19048: i = BG_SA_PURPLE_GATE; break; //purple gate
- case 19049: i = BG_SA_YELLOW_GATE; break; //yellow gate
- case 19837: i = BG_SA_ANCIENT_GATE; break; //ancient gate
+ // Green gate
+ case BG_SA_EVENT_GREEN_GATE_DAMAGED:
+ case BG_SA_EVENT_GREEN_GATE_DESTROYED:
+ return BG_SA_GREEN_GATE;
+ // Blue gate
+ case BG_SA_EVENT_BLUE_GATE_DAMAGED:
+ case BG_SA_EVENT_BLUE_GATE_DESTROYED:
+ return BG_SA_BLUE_GATE;
+ // Red gate
+ case BG_SA_EVENT_RED_GATE_DAMAGED:
+ case BG_SA_EVENT_RED_GATE_DESTROYED:
+ return BG_SA_RED_GATE;
+ // Purple gate
+ case BG_SA_EVENT_PURPLE_GATE_DAMAGED:
+ case BG_SA_EVENT_PURPLE_GATE_DESTROYED:
+ return BG_SA_PURPLE_GATE;
+ // Yellow gate
+ case BG_SA_EVENT_YELLOW_GATE_DAMAGED:
+ case BG_SA_EVENT_YELLOW_GATE_DESTROYED:
+ return BG_SA_YELLOW_GATE;
+ // Ancient gate
+ case BG_SA_EVENT_ANCIENT_GATE_DAMAGED:
+ case BG_SA_EVENT_ANCIENT_GATE_DESTROYED:
+ return BG_SA_ANCIENT_GATE;
+ default:
+ break;
}
- return i;
+ return 0;
}
/// Return worldstate id, according to door id
- uint32 GetWorldStateFromGateID(uint32 id)
+ uint32 getWorldStateFromGateId(uint32 id)
{
- uint32 uws = 0;
switch (id)
{
- case BG_SA_GREEN_GATE: uws = BG_SA_GREEN_GATEWS; break;
- case BG_SA_YELLOW_GATE: uws = BG_SA_YELLOW_GATEWS; break;
- case BG_SA_BLUE_GATE: uws = BG_SA_BLUE_GATEWS; break;
- case BG_SA_RED_GATE: uws = BG_SA_RED_GATEWS; break;
- case BG_SA_PURPLE_GATE: uws = BG_SA_PURPLE_GATEWS; break;
- case BG_SA_ANCIENT_GATE: uws = BG_SA_ANCIENT_GATEWS; break;
+ case BG_SA_GREEN_GATE:
+ return BG_SA_GREEN_GATEWS;
+ case BG_SA_YELLOW_GATE:
+ return BG_SA_YELLOW_GATEWS;
+ case BG_SA_BLUE_GATE:
+ return BG_SA_BLUE_GATEWS;
+ case BG_SA_RED_GATE:
+ return BG_SA_RED_GATEWS;
+ case BG_SA_PURPLE_GATE:
+ return BG_SA_PURPLE_GATEWS;
+ case BG_SA_ANCIENT_GATE:
+ return BG_SA_ANCIENT_GATEWS;
+ default:
+ break;
}
- return uws;
+ return 0;
}
/// Called on battleground ending