feat(Misc): add support new api (#18)

This commit is contained in:
Kargatum
2021-12-07 18:53:30 +07:00
committed by GitHub
parent 630e1bcd0c
commit d217162c3c
126 changed files with 75669 additions and 62 deletions

View File

@@ -1,42 +0,0 @@
CU_SET_PATH("CMAKE_AZTH_DIR" "${CMAKE_CURRENT_LIST_DIR}")
MACRO(AZTH_LOAD_SRC dir)
CU_SUBDIRLIST(sub_DIRS "${CMAKE_AZTH_DIR}/modules/${dir}" TRUE TRUE)
FOREACH(subdir ${sub_DIRS})
get_filename_component(azth_dir_name ${subdir} DIRECTORY)
if (NOT (${azth_dir_name} STREQUAL "tests") OR AZTH_WITH_UNIT_TEST)
file(GLOB sources "${subdir}/*.cpp" "${subdir}/*.h")
set(azth_STAT_SRCS
${azth_STAT_SRCS}
${sources}
)
set(azth_DIRS
${subdir}
${azth_DIRS}
)
endif()
ENDFOREACH()
ENDMACRO()
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-as-platform")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-as-common")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-arena-solo-3v3")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-guildhouse")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-hearthstone-mode")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-playerstats")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-challenge-mode")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-pvpitemlevel")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-pvp-mode")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-smartstone")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-timewalking")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-tournament")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/modules/mod-xp-rates")
AC_ADD_SCRIPTS("${CMAKE_CURRENT_LIST_DIR}/src/")
# Add config file
AC_ADD_CONFIG_FILE("${CMAKE_CURRENT_LIST_DIR}/mod-as-common/conf/azth_mod.conf.dist")

View File

@@ -0,0 +1,31 @@
#
# This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
########################################
# AzerothShard module configuration
########################################
#
# Difference between the position level and the player level to disable the reward
# default: 0 (disabled)
#
ChallengeMode.noReward.deltaLevelHigher = 0
ChallengeMode.noReward.deltaLevelLower = 0
#
# Position levels to start checking for the difference between the position and the player level
# default: 0 (disabled)
#
ChallengeMode.noReward.startLevelHigher = 0
ChallengeMode.noReward.startLevelLower = 0

28
conf/Solo3v3.conf.dist Normal file
View File

@@ -0,0 +1,28 @@
#
# Copyright (С) since 2019 Andrei Guluaev (Winfidonarleyan/Kargatum) https://github.com/Winfidonarleyan
#
###############################
# Custom configuration system #
###############################
[worldserver]
###################################################################################################
# SOLO 3v3 ARENA
#
# Solo.3v3.Enable
# Description: Enable system
# Default: 1
#
Solo.3v3.Enable = 1
Solo.3v3.MinLevel = 80
Solo.3v3.Cost = 45
Solo.3v3.ArenaPointsMulti = 0.8
Solo.3v3.FilterTalents = 1
Solo.3v3.VendorRating = 1
Arena.1v1.BlockForbiddenTalents = 0
Arena.CheckEquipAndTalents = 1
Solo.3v3.CastDeserterOnAfk = 1
Solo.3v3.CastDeserterOnLeave = 1
Solo.3v3.StopGameIncomplete = 1

View File

@@ -1,15 +0,0 @@
[worldserver]
#
# Difference between the position level and the player level to disable the reward
# default: 0 (disabled)
#
ChallengeMode.noReward.deltaLevelHigher=0
ChallengeMode.noReward.deltaLevelLower=0
#
# Position levels to start checking for the difference between the position and the player level
# default: 0 (disabled)
#
ChallengeMode.noReward.startLevelHigher=0
ChallengeMode.noReward.startLevelLower=0

View File

@@ -0,0 +1,13 @@
DROP TABLE IF EXISTS `reputation_vendor`;
CREATE TABLE `reputation_vendor`(
`vendorId` INT(10) NOT NULL COMMENT 'vendor id',
`reputation` INT(10) NOT NULL DEFAULT 948 COMMENT 'faction required',
`value` INT(10) NOT NULL DEFAULT 3000 COMMENT 'how much reputation is required',
`gossipSatisfied` INT(10) NOT NULL COMMENT 'gossip id when enough reputation',
`gossipUnsatisfied` INT(10) NOT NULL COMMENT 'gossip id when not enough reputation',
PRIMARY KEY (`vendorId`)
);
-- vendor pvp only
ALTER TABLE `reputation_vendor`
ADD COLUMN `PvPVendor` INT(1) NOT NULL DEFAULT '0' AFTER `gossipUnsatisfied`;

View File

@@ -0,0 +1,10 @@
DELETE FROM `reputation_vendor` WHERE vendorId IN (100002, 100003, 100004, 100005, 100006, 100100, 100101, 100102, 100103);
INSERT INTO `reputation_vendor` (vendorId, reputation, `value`, gossipSatisfied, gossipUnsatisfied) VALUES
(100002, 948, 0, 32001, 32010),
(100003, 948, 3000, 32001, 32010),
(100004, 948, 6000, 32001, 32010),
(100005, 948, 12000, 32001, 32010),
(100006, 948, 21000, 32001, 32010),
(100100, 948, 3000, 32000, 32010),
(100101, 948, 6000, 32002, 32010),
(100102, 948, 0, 32003, 32010);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,49 @@
/*Table structure for table `armory_character_stats` */
DROP TABLE IF EXISTS `armory_character_stats`;
CREATE TABLE `armory_character_stats` (
`guid` int(11) NOT NULL,
`data` longtext NOT NULL,
`save_date` int(11) DEFAULT NULL,
PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='World of Warcraft Armory table';
/*Table structure for table `armory_game_chart` */
DROP TABLE IF EXISTS `armory_game_chart`;
CREATE TABLE `armory_game_chart` (
`gameid` int(11) NOT NULL,
`teamid` int(11) NOT NULL,
`guid` int(11) NOT NULL,
`changeType` int(11) NOT NULL,
`ratingChange` int(11) NOT NULL,
`teamRating` int(11) NOT NULL,
`damageDone` int(11) NOT NULL,
`deaths` int(11) NOT NULL,
`healingDone` int(11) NOT NULL,
`damageTaken` int(11) NOT NULL,
`healingTaken` int(11) NOT NULL,
`killingBlows` int(11) NOT NULL,
`mapId` int(11) NOT NULL,
`start` int(11) NOT NULL,
`end` int(11) NOT NULL,
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`gameid`,`teamid`,`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='WoWArmory Game Chart';
/*Table structure for table `character_feed_log` */
DROP TABLE IF EXISTS `character_feed_log`;
CREATE TABLE `character_feed_log` (
`guid` int(11) NOT NULL,
`type` smallint(1) NOT NULL,
`data` int(11) NOT NULL,
`date` int(11) DEFAULT NULL,
`counter` int(11) NOT NULL,
`difficulty` smallint(6) DEFAULT '-1',
`item_guid` int(11) DEFAULT '-1',
`item_quality` smallint(6) NOT NULL DEFAULT '-1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,20 @@
DROP TABLE IF EXISTS `rating_bonuses`;
CREATE TABLE `rating_bonuses` (
`id` INT(10) NOT NULL,
`type` INT(10) NOT NULL COMMENT '2 = 2v2, 3 = 3v3, 5 = 5v5, 1 = 1v1',
`day` INT(10) DEFAULT '0' COMMENT '0 to 6, 0 = sunday',
`startHour` INT(10) DEFAULT '12' COMMENT '0 to 23',
`endHour` INT(10) DEFAULT '12' COMMENT '0 to 23',
`multiplier` INT(10) DEFAULT '2',
PRIMARY KEY (`id`)
);
-- domenica, dalle 21 alle 23 bonus 3x alle 5v5
INSERT INTO `rating_bonuses` VALUES (1, 5, 0, 21, 23, 3);
-- domenica, dalle 15 alle 17 bonus 3x alle 3v3
INSERT INTO `rating_bonuses` VALUES (2, 3, 0, 15, 17, 3);
-- giovedì, dalle 21 alle 23 bonus 3x alle 3v3
INSERT INTO `rating_bonuses` VALUES (3, 3, 4, 21, 23, 3);
-- giovedì, dalle 21 alle 23 bonus 3x alle 5v5
INSERT INTO `rating_bonuses` VALUES (4, 5, 4, 15, 17, 3);

View File

@@ -0,0 +1,7 @@
create table `buy_log` (
`playerGuid` bigint (10),
`item` int (10),
`vendor` bigint (10),
`price` bigint (10),
`date` timestamp
);

View File

@@ -0,0 +1,12 @@
DROP TABLE IF EXISTS `character_saved_position`;
CREATE TABLE `character_saved_position`(
`charGuid` INT(10) NOT NULL,
`type` INT(10) NOT NULL,
`posX` FLOAT(10) NOT NULL,
`posY` FLOAT(10) NOT NULL,
`posZ` FLOAT(10) NOT NULL,
`mapId` FLOAT(10) NOT NULL
);
ALTER TABLE `character_saved_position`
ADD CONSTRAINT `character_saved_position` UNIQUE(`charGuid`, `type`);

View File

@@ -0,0 +1,9 @@
DROP TABLE IF EXISTS `character_smartstone_commands`;
CREATE TABLE `character_smartstone_commands`
( `playerGuid` INT(10) NOT NULL COMMENT 'player guid',
`command` INT(10) NOT NULL COMMENT 'player command id',
`dateExpired` BIGINT(10) NOT NULL DEFAULT '0',
`charges` INT(10) NOT NULL DEFAULT '-1');
ALTER TABLE `character_smartstone_commands`
ADD CONSTRAINT `character_smartstone_commands` UNIQUE(playerGuid, command);

View File

@@ -0,0 +1,5 @@
CREATE TABLE `character_xp_rate` (
`guid` int(10) UNSIGNED NOT NULL,
`xp_rate` float UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player XP Rate System';

View File

@@ -0,0 +1,32 @@
DROP TABLE IF EXISTS `smartstone_commands`;
CREATE TABLE `smartstone_commands` (
`id` INT(10) NOT NULL COMMENT 'command id',
`text` TEXT NOT NULL COMMENT 'text that will be shown to the player',
`item` INT(10) DEFAULT NULL COMMENT 'item that will provide this command',
`icon` INT(10) DEFAULT NULL COMMENT 'icon id for the command',
`parent_menu` INT(10) DEFAULT NULL COMMENT 'menu that will contain the command',
`type` INT(10) DEFAULT '1' COMMENT 'type of command',
`action` INT(10) DEFAULT NULL COMMENT 'based on type',
`charges` INT(10) DEFAULT '-1' COMMENT 'number of times it can be used',
`duration` INT(10) DEFAULT '0' COMMENT 'duration in minutes',
`comment` TEXT COMMENT 'description of the command',
PRIMARY KEY (`id`),
UNIQUE KEY `item` (`item`)
);
DELETE FROM `smartstone_commands`;
INSERT INTO `smartstone_commands` (id, `text`, item, icon, parent_menu, `type`, `action`, charges, duration, `comment`) VALUES
(1, "Teletrasportami al Mercato Nero", NULL, 2, 1, 1, 0, -1, 0, "Teletrasporto al Mercato Nero"),
(2, "Change Faction", 987890, 0, 2, 1, 0, 1, 0, "Change Faction 1 charge"),
(3, "Rename", 987891, 0, 2, 1, 0, 1, 0, "Rename character 1 charge"),
(4, "Menù character", NULL, 1, 1, 2, 2, -1, 0, "submenu character"),
(5, "Change Race", 987892, 0, 2, 1, 0, 1, 0, "Change character race 1 charge"),
(6, "Jukebox!", 987893, 6, 1, 1, 0, 1, 0, "summon jukebox"),
(7, "Herbalism", 987894, 0, 3, 1, 0, -1, 0, "bonus loot herbalism"),
(8, "Mining", 987895, 0, 3, 1, 0, -1, 0, "bonus loot mining"),
(9, "Bonus passivi", NULL, 1, 1, 2, 3, -1, 0, "submenu for passive bonuses");
-- new commands
DELETE FROM smartstone_commands WHERE id IN(10,11);
INSERT INTO smartstone_commands VALUES (10, "Max Skill", NULL,9, 2, 1, 0, -1, 0, "Max Skill Command");
INSERT INTO smartstone_commands VALUES (11, "Modifica xp rate", NULL,4, 2, 3, 0, -1, 0, "Azth xp command");

View File

@@ -0,0 +1,5 @@
CREATE TABLE IF NOT EXISTS `gh_guildadd` (
`guildId` int(11) unsigned NOT NULL,
`GuildHouse_Add` int(11) unsigned NOT NULL,
PRIMARY KEY (`guildId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@@ -0,0 +1 @@
ALTER TABLE `groups` ADD COLUMN `MaxlevelGroup` INT(10) UNSIGNED DEFAULT 0 NOT NULL AFTER `masterLooterGuid`;

View File

@@ -0,0 +1,13 @@
CREATE TABLE `guildhouses` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`guildId` bigint(20) NOT NULL DEFAULT '0',
`x` double NOT NULL,
`y` double NOT NULL,
`z` double NOT NULL,
`map` int(16) NOT NULL,
`comment` varchar(255) NOT NULL DEFAULT '',
`price` bigint(20) NOT NULL DEFAULT '0',
`faction` int(8) unsigned NOT NULL DEFAULT '3',
`minguildsize` int(16) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

View File

@@ -0,0 +1,59 @@
DROP TABLE IF EXISTS `hearthstone_criteria_credits`;
CREATE TABLE `hearthstone_criteria_credits`(
`type` INT(10) NOT NULL DEFAULT 0 COMMENT 'criteria type (column 3)',
`data0` INT(10) DEFAULT 0 COMMENT 'column 4',
`data1` INT(10) DEFAULT 0 COMMENT 'column 5',
`creature` BIGINT(10) DEFAULT 0 COMMENT 'linked creature',
`comment` TEXT
);
-- honorable kill at area 31, areatable.db, count
INSERT INTO `hearthstone_criteria_credits` (`type`, `data0`, `data1`, `creature`,`comment`) VALUES
-- Bg wins
(1, 30, 1, 110001, "Alterac Valley Victory"),
(1, 489, 1, 110002, "Warsong Gulch Victory"),
(1, 529, 1, 110003, "Arathi Basin Victory"),
(1, 566, 1, 110004, "Eye of the Storm Victory"),
(1, 607, 1, 110005, "Strand of the Ancients Victory"),
(1, 628, 1, 110006, "Isle of Conquest Victory"),
-- Bg Objectives
(30, 122, 1, 110007, "Arathi Basin Flag Capture "),
(30, 42, 1, 110008, "Warsong Gulch Flag Capture"),
(30, 44, 1, 110009, "Warsong Gulch Flag Recover"),
(30, 183, 1, 110010, "Eye of the Storm Flag Capture"),
(30, 63, 1, 110011, "Alterac Valley Graveyard Capture"),
(30, 64, 1, 110012, "Alterac Valley Tower Defense"),
(30, 61, 1, 110013, "Alterac Valley Tower Capture"),
(30, 123, 1, 110014, "Arathi Basin Base Defense"),
(30, 65, 1, 110015, "Alterac Valley Graveyard Capture"), -- need test!! not sure
(30, 245, 1, 110016, "Isle of Conquest Base Capture"), -- not sure, maybe this is defend
(30, 246, 1, 110017, "Isle of Conquest Base Defend"), -- not sure, maybe this is capture
-- Kill Class
(52, 1, 1, 110018, "Kill a Warrior"),
(52, 2, 1, 110019, "Kill a Paladin"),
(52, 3, 1, 110020, "Kill a Hunter"),
(52, 4, 1, 110021, "Kill a Rogue"),
(52, 5, 1, 110022, "Kill a Priest"),
(52, 6, 1, 110023, "Kill a Death Knight"),
(52, 7, 1, 110024, "Kill a Shaman"),
(52, 8, 1, 110025, "Kill a Mage"),
(52, 9, 1, 110026, "Kill a Warlock"),
(52, 11, 1, 110027, "Kill a Druid"),
-- Kill Race
(53, 1, 1, 110028, "Kill a Human"),
(53, 2, 1, 110029, "Kill an Orc"),
(53, 3, 1, 110030, "Kill a Dwarf"),
(53, 4, 1, 110031, "Kill a Night Elf"),
(53, 5, 1, 110032, "Kill an Undead"),
(53, 6, 1, 110033, "Kill a Tauren"),
(53, 7, 1, 110034, "Kill a Gnome"),
(53, 8, 1, 110035, "Kill a Troll"),
(53, 10, 1, 110036, "Kill a Blood Elf"),
(53, 11, 1, 110037, "Kill a Draenei"),
-- Get Kills
(56, 0, 1, 110038, "Get a Killing Blow"),
(113, 0, 1, 110039, "Earn Honorable Kill"),
-- Win Duel
(76, 0, 1, 110040, "Win Duel")
;

View File

@@ -0,0 +1,20 @@
DROP TABLE IF EXISTS `hearthstone_quests`;
CREATE TABLE `hearthstone_quests`(
`id` BIGINT(10) NOT NULL,
`flag` INT(10) DEFAULT 0, -- 1 pve, 2 pvp
PRIMARY KEY (`id`)
);
-- pve quests
DELETE FROM hearthstone_quests WHERE id >= 100000 AND id <= 100080;
INSERT INTO hearthstone_quests (id) VALUES
(100000),(100001),(100002),(100003),(100004),(100005),(100006),(100007),(100008),(100009),(100010),(100011),(100012),(100013),(100014),(100015),(100016),(100017),(100018),(100019),(100020),(100021),(100022),(100023),(100024),(100025),(100026),(100027),(100028),(100029),(100030),(100031),(100032),(100033),(100034),(100035),(100036),(100037),(100038),(100039),(100040),(100041),(100042),(100043),(100044),(100045),(100046),(100047),(100048),(100049),(100050),(100051),(100052),(100053),(100054),(100055),(100056),(100057),(100058),(100059),(100060),(100061),(100062),(100063),(100064),(100065),(100066),(100067),(100068),(100069),(100070),(100071),(100072),(100073),(100074),(100075),(100076),(100077),(100078),(100079),(100080);
UPDATE hearthstone_quests SET flag = 1 WHERE id >= 100000 AND id <= 100080;
-- pvp quests
DELETE FROM hearthstone_quests WHERE id >= 110040 AND id <= 110095;
INSERT INTO hearthstone_quests (id) VALUES
(110040),(110041),(110042),(110043),(110044),(110045),(110046),(110047),(110048),(110049),(110050),(110051),(110052),(110053),(110054),(110055),(110056),(110057),(110058),(110059),(110060),(110061),(110062),(110063),(110064),(110065),(110066),(110067),(110068),(110069),(110070),(110071),(110072),(110073),(110074),(110075),(110076),(110077),(110078),(110079),(110080),(110081),(110082),(110083),(110084),(110085),(110086),(110087),(110088),(110089),(110090),(110091),(110092),(110093),(110094),(110095);
UPDATE hearthstone_quests SET flag = 2 WHERE id >= 110040 AND id <= 110095;

View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS `mail_external` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`receiver` int(10) unsigned NOT NULL,
`subject` varchar(200) DEFAULT 'Support Message',
`message` varchar(400) DEFAULT NULL,
`money` int(10) unsigned NOT NULL DEFAULT '0',
`item` int(10) unsigned NOT NULL DEFAULT '0',
`item_count` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=61578 DEFAULT CHARSET=utf8;

View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS azth_achievement_stats (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`playerGuid` int(10) unsigned NOT NULL DEFAULT '0',
`achievement` int(10) unsigned NOT NULL DEFAULT '0',
`type` int(8) unsigned NOT NULL DEFAULT '0' COMMENT '0 -> achievement, 1 -> criteria',
`level` int(10) unsigned NOT NULL DEFAULT '0',
`levelParty` int(10) unsigned DEFAULT '0',
`date` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS `pvp_accounts` (
`id` int(11) DEFAULT NULL,
`isPvP` int(11) DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `pvp_characters` (
`id` int(11) DEFAULT NULL,
`isPvP` int(11) DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@@ -0,0 +1,9 @@
DROP TABLE IF EXISTS `azth_character_morph`;
CREATE TABLE `azth_character_morph`(
`guid` INT NOT NULL,
`entry` INT NOT NULL,
`name` TEXT,
`comment` TEXT
);
ALTER TABLE `azth_character_morph`
ADD CONSTRAINT `azth_character_morph` UNIQUE(guid, entry);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
INSERT INTO worldstates VALUES (100000, 0, 0);

View File

@@ -0,0 +1,66 @@
-- FULL `creature_template` of entry 100000
DELETE FROM `creature_template` WHERE (entry = 100000);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100000, 0, 0, 0, 0, 0, 23055, 0, 0, 0, 'Han\'al', 'Master Lorekeeper', NULL, 30000, 83, 83, 0, 2007, 3, 1.1, 1.5, 1.2, 1, 0, 0, 0, 8, 33536, 2048, 0, 0, 0, 0, 0, 0, 7, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'SmartAI', 0, 3, 0, 10, 10, 1, 0, 0, 1, 0, 2, 'npc_han_al', 12341);
DELETE FROM npc_text WHERE ID IN (100000, 100001, 100002, 100003);
INSERT INTO npc_text (ID, text0_0, text0_1, lang0, em0_0) VALUES
(100000, "È bello che tu voglia aiutarmi $N, la storia dev'essere scrupolosamente registrata... nulla deve andar perso!", 0, 0, 0),
(100001, "Hai già delle missioni da completare, ritorna quando sarai riuscito a portarle a termine o quando avrai rinunciato...\nNonostante il fallimento potrei avere ancora bisogno di te, $R", 0, 0, 0),
(100002, "Grazie del tuo aiuto, $C, per oggi mi hai aiutato a sufficienza!\nRitorna domani.", 0, 0, 0),
(100003, "Hai già molto lavoro da fare, $N. Non vorrei che ti affaticassi troppo... torna da me quando avrai concluso un po' del tuo lavoro.", 0, 0, 0);
UPDATE `item_template` SET `Flags` = 64, `ScriptName` = 'item_azth_hearthstone_loot_sack', stackable = 1, `spellid_1` = 36177, maxcount = 5 WHERE (entry = 32558);
-- VENDORS (DEBUG)
-- NEUTRAL
DELETE FROM `creature_template` WHERE (entry = 100002);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100002, 0, 0, 0, 0, 0, 22439, 0, 0, 0, 'Azth Neutral Vendor', 'AzerothShard', '', 0, 70, 70, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
-- FRIENDLY
DELETE FROM `creature_template` WHERE (entry = 100003);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100003, 0, 0, 0, 0, 0, 22439, 0, 0, 0, 'Azth Friendly Vendor', 'AzerothShard', '', 0, 70, 70, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
-- HONORED
DELETE FROM `creature_template` WHERE (entry = 100004);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100004, 0, 0, 0, 0, 0, 22439, 0, 0, 0, 'Azth Honored Vendor', 'AzerothShard', '', 0, 70, 70, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
-- REVERED
DELETE FROM `creature_template` WHERE (entry = 100005);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100005, 0, 0, 0, 0, 0, 22439, 0, 0, 0, 'Azth Revered Vendor', 'AzerothShard', '', 0, 70, 70, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
-- EXALTED
DELETE FROM `creature_template` WHERE (entry = 100006);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100006, 0, 0, 0, 0, 0, 22439, 0, 0, 0, 'Azth Exalted Vendor', 'AzerothShard', '', 0, 70, 70, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
UPDATE creature_template SET resistance2 = 0 WHERE entry = 100002;
UPDATE creature_template SET resistance2 = 3000 WHERE entry = 100003;
UPDATE creature_template SET resistance2 = 6000 WHERE entry = 100004;
UPDATE creature_template SET resistance2 = 12000 WHERE entry = 100005;
UPDATE creature_template SET resistance2 = 21000 WHERE entry = 100006;
UPDATE creature_template SET `npcflag` = 129, `unit_flags` = 768, `type_flags` = 134217728, `flags_extra` = 2, scriptname = "npc_azth_vendor", resistance1 = 32001, gossip_menu_id = 32001 WHERE entry IN (100002, 100003, 100004, 100005, 100006);
-- END VENDORS DEBUG
-- DEBUG ONLY
DELETE FROM npc_vendor WHERE entry IN (100002, 100003, 100004, 100005, 100006, 100007);
INSERT INTO npc_vendor (entry, item, extendedcost) VALUES
(100002, 32558, 100010),
(100003, 32558, 100009),
(100004, 32558, 100008),
(100004, 32558, 100007),
(100005, 32558, 100006),
(100006, 32558, 100005),
(100003, 49426, 100005),
(100003, 47241, 100004),
(100003, 45624, 100003),
(100003, 40753, 100002),
(100003, 49752, 100001);

24718
data/sql/db-world/01_items.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
DELETE FROM quest_template WHERE id >= 100000 AND id <= 100100;
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100000','2','3840','4290','Uccidi Illidan','Han\'al vuole che tu uccida Illidan ancora una volta.','Uccidi Illidan','Ritorna da Han\'al','22917','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100001','2','3845','4290','Uccidi Kael\'Thas','Han\'al vuole che tu uccida Kael\'Thas ancora una volta.','Uccidi Kael\'Thas','Ritorna da Han\'al','19622','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100002','2','3845','4290','Uccidi Solarian','Han\'al vuole che tu uccida Solarian ancora una volta.','Uccidi Solarian','Ritorna da Han\'al','18805','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100003','2','3607','4290','Uccidi Morogrim','Han\'al vuole che tu uccida Morogrim ancora una volta.','Uccidi Morogrim','Ritorna da Han\'al','21213','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100004','2','3607','4290','Uccidi Lady Vashj','Han\'al vuole che tu uccida Lady Vashj ancora una volta.','Uccidi Lady Vashj','Ritorna da Han\'al','21212','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100005','2','3607','4290','Uccidi Leotheras','Han\'al vuole che tu uccida Leotheras ancora una volta.','Uccidi Leotheras','Ritorna da Han\'al','21215','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100006','2','3607','4290','Uccidi The Lurker Below','Han\'al vuole che tu uccida The Lurker Below ancora una volta.','Uccidi The Lurker Below','Ritorna da Han\'al','21217','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100007','2','3836','4290','Uccidi Magtheridon','Han\'al vuole che tu uccida Magtheridon ancora una volta.','Uccidi Magtheridon','Ritorna da Han\'al','17257','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100008','2','3923','4290','Uccidi Gruul','Han\'al vuole che tu uccida Gruul ancora una volta.','Uccidi Gruul','Ritorna da Han\'al','19044','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100009','2','3805','4290','Uccidi Zul\'Jin','Han\'al vuole che tu uccida Zul\'Jin ancora una volta.','Uccidi Zul\'Jin','Ritorna da Han\'al','23863','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100010','2','3805','4290','Uccidi Malacrass','Han\'al vuole che tu uccida Malacrass ancora una volta.','Uccidi Malacrass','Ritorna da Han\'al','24239','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100011','2','3805','4290','Uccidi Jan\'Alai','Han\'al vuole che tu uccida Jan\'Alai ancora una volta.','Uccidi Jan\'Alai','Ritorna da Han\'al','23578','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100012','2','3805','4290','Uccidi Halazzi','Han\'al vuole che tu uccida Halazzi ancora una volta.','Uccidi Halazzi','Ritorna da Han\'al','23577','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100013','2','3457','4290','Uccidi Moroes','Han\'al vuole che tu uccida Moroes ancora una volta.','Uccidi Moroes','Ritorna da Han\'al','15687','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100014','2','3457','4290','Uccidi Terestian','Han\'al vuole che tu uccida Terestian ancora una volta.','Uccidi Terestian','Ritorna da Han\'al','15688','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100015','2','3457','4290','Uccidi Netherspite','Han\'al vuole che tu uccida Netherspite ancora una volta.','Uccidi Netherspite','Ritorna da Han\'al','15689','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100016','2','3457','4290','Uccidi Nightbane','Han\'al vuole che tu uccida Nightbane ancora una volta.','Uccidi Nightbane','Ritorna da Han\'al','17225','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100017','2','3457','4290','Uccidi Prince Malchezaar','Han\'al vuole che tu uccida Prince Malchezaar ancora una volta.','Uccidi Prince Malchezaar','Ritorna da Han\'al','15690','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100018','2','616','4290','Uccidi Anetheron','Han\'al vuole che tu uccida Anetheron ancora una volta.','Uccidi Anetheron','Ritorna da Han\'al','17808','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100019','2','616','4290','Uccidi Azgalor','Han\'al vuole che tu uccida Azgalor ancora una volta.','Uccidi Azgalor','Ritorna da Han\'al','17842','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100020','2','616','4290','Uccidi Archimonde','Han\'al vuole che tu uccida Archimonde ancora una volta.','Uccidi Archimonde','Ritorna da Han\'al','17968','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100021','2','3840','4290','Uccidi Gurtogg','Han\'al vuole che tu uccida Gurtogg ancora una volta.','Uccidi Gurtogg','Ritorna da Han\'al','22948','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100022','2','3840','4290','Uccidi Shahraz','Han\'al vuole che tu uccida Shahraz ancora una volta.','Uccidi Shahraz','Ritorna da Han\'al','22947','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100023','2','3840','4290','Uccidi Teron','Han\'al vuole che tu uccida Teron ancora una volta.','Uccidi Teron','Ritorna da Han\'al','22871','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100024','2','4080','4290','Uccidi Felmyst','Han\'al vuole che tu uccida Felmyst ancora una volta.','Uccidi Felmyst','Ritorna da Han\'al','25038','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100025','2','4080','4290','Uccidi Kil\'Jaeden','Han\'al vuole che tu uccida Kil\'Jaeden ancora una volta.','Uccidi Kil\'Jaeden','Ritorna da Han\'al','25315','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100026','2','1977','4290','Uccidi Arlokk','Han\'al vuole che tu uccida Arlokk ancora una volta.','Uccidi Arlokk','Ritorna da Han\'al','14515','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100027','2','1977','4290','Uccidi Jin\'do','Han\'al vuole che tu uccida Jin\'do ancora una volta.','Uccidi Jin\'do','Ritorna da Han\'al','11380','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100028','2','1977','4290','Uccidi Hakkar','Han\'al vuole che tu uccida Hakkar ancora una volta.','Uccidi Hakkar','Ritorna da Han\'al','14834','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100029','2','1583','4290','Uccidi Gyth','Han\'al vuole che tu uccida Gyth ancora una volta.','Uccidi Gyth','Ritorna da Han\'al','10339','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100030','2','1583','4290','Uccidi The Beast','Han\'al vuole che tu uccida The Beast ancora una volta.','Uccidi The Beast','Ritorna da Han\'al','10430','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100031','2','1583','4290','Uccidi Lord Valthalak','Han\'al vuole che tu uccida Lord Valthalak ancora una volta.','Uccidi Lord Valthalak','Ritorna da Han\'al','16042','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100032','2','1583','4290','Uccidi Drakkisath','Han\'al vuole che tu uccida Drakkisath ancora una volta.','Uccidi Drakkisath','Ritorna da Han\'al','10363','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100033','2','3429','4290','Uccidi Ayamiss','Han\'al vuole che tu uccida Ayamiss ancora una volta.','Uccidi Ayamiss','Ritorna da Han\'al','15369','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100034','2','3429','4290','Uccidi Ossirian','Han\'al vuole che tu uccida Ossirian ancora una volta.','Uccidi Ossirian','Ritorna da Han\'al','15339','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100035','2','2717','4290','Uccidi Golemagg','Han\'al vuole che tu uccida Golemagg ancora una volta.','Uccidi Golemagg','Ritorna da Han\'al','11988','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100036','2','2717','4290','Uccidi Sulfuron Harbinger','Han\'al vuole che tu uccida Sulfuron Harbinger ancora una volta.','Uccidi Sulfuron Harbinger','Ritorna da Han\'al','12098','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100037','2','2717','4290','Uccidi Ragnaros','Han\'al vuole che tu uccida Ragnaros ancora una volta.','Uccidi Ragnaros','Ritorna da Han\'al','11502','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100038','2','2677','4290','Uccidi Ebonroc','Han\'al vuole che tu uccida Ebonroc ancora una volta.','Uccidi Ebonroc','Ritorna da Han\'al','14601','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100039','2','2677','4290','Uccidi Firemaw','Han\'al vuole che tu uccida Firemaw ancora una volta.','Uccidi Firemaw','Ritorna da Han\'al','11983','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100040','2','2677','4290','Uccidi Chromaggus','Han\'al vuole che tu uccida Chromaggus ancora una volta.','Uccidi Chromaggus','Ritorna da Han\'al','14020','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100041','2','2677','4290','Uccidi Nefarian','Han\'al vuole che tu uccida Nefarian ancora una volta.','Uccidi Nefarian','Ritorna da Han\'al','11583','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100042','2','3428','4290','Uccidi Princess Huhuran','Han\'al vuole che tu uccida Princess Huhuran ancora una volta.','Uccidi Princess Huhuran','Ritorna da Han\'al','15509','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100043','2','3428','4290','Uccidi i Twin Emperor','Han\'al vuole che tu uccida i Twin Emperor ancora una volta.','Uccidi i Twin Emperor','Ritorna da Han\'al','15276','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100044','2','3428','4290','Uccidi Viscidus','Han\'al vuole che tu uccida Viscidus ancora una volta.','Uccidi Viscidus','Ritorna da Han\'al','15299','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100045','2','3428','4290','Uccidi Ouro','Han\'al vuole che tu uccida Ouro ancora una volta.','Uccidi Ouro','Ritorna da Han\'al','15517','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100046','2','3428','4290','Uccidi C\'Thun','Han\'al vuole che tu uccida C\'Thun ancora una volta.','Uccidi C\'Thun','Ritorna da Han\'al','15727','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100047','2','2557','4290','Uccidi Immol\'thar','Han\'al vuole che tu uccida Immol\'thar ancora una volta.','Uccidi Immol\'thar','Ritorna da Han\'al','11496','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100048','2','2557','4290','Uccidi Tortheldrin','Han\'al vuole che tu uccida Tortheldrin ancora una volta.','Uccidi Tortheldrin','Ritorna da Han\'al','11486','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100049','2','2557','4290','Uccidi Gordok','Han\'al vuole che tu uccida Gordok ancora una volta.','Uccidi Gordok','Ritorna da Han\'al','11501','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100050','2','2557','4290','Uccidi Alzzin','Han\'al vuole che tu uccida Alzzin ancora una volta.','Uccidi Alzzin','Ritorna da Han\'al','11492','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100051','2','2057','4290','Uccidi Ras Frostwhisper','Han\'al vuole che tu uccida Ras Frostwhisper ancora una volta.','Uccidi Ras Frostwhisper','Ritorna da Han\'al','10508','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100052','2','2057','4290','Uccidi Darkmaster Gandling','Han\'al vuole che tu uccida Darkmaster Gandling ancora una volta.','Uccidi Darkmaster Gandling','Ritorna da Han\'al','1853','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100053','2','722','4290','Uccidi Amnennar the Cold','Han\'al vuole che tu uccida Amnennar the Cold ancora una volta.','Uccidi Amnennar the Cold','Ritorna da Han\'al','7358','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100054','2','2100','4290','Uccidi Celebras','Han\'al vuole che tu uccida Celebras ancora una volta.','Uccidi Celebras','Ritorna da Han\'al','12225','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100055','2','2100','4290','Uccidi Theradras','Han\'al vuole che tu uccida Theradras ancora una volta.','Uccidi Theradras','Ritorna da Han\'al','12201','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100056','2','719','4290','Uccidi Lorgus Jett','Han\'al vuole che tu uccida Lorgus Jett ancora una volta.','Uccidi Lorgus Jett','Ritorna da Han\'al','12902','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100057','2','719','4290','Uccidi Old Serra\'kis','Han\'al vuole che tu uccida Old Serra\'kis ancora una volta.','Uccidi Old Serra\'kis','Ritorna da Han\'al','4830','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100058','2','719','4290','Uccidi Aku\'mai','Han\'al vuole che tu uccida Aku\'mai ancora una volta.','Uccidi Aku\'mai','Ritorna da Han\'al','4829','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100059','2','978','4290','Uccidi Nekrum Gutchewer','Han\'al vuole che tu uccida Nekrum Gutchewer ancora una volta.','Uccidi Nekrum Gutchewer','Ritorna da Han\'al','7796','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100060','2','978','4290','Uccidi Ukorz Sandscalp','Han\'al vuole che tu uccida Ukorz Sandscalp ancora una volta.','Uccidi Ukorz Sandscalp','Ritorna da Han\'al','7267','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100061','2','2017','4290','Uccidi Balnazzar','Han\'al vuole che tu uccida Balnazzar ancora una volta.','Uccidi Balnazzar','Ritorna da Han\'al','10813','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100062','2','2017','4290','Uccidi Titus Rivendare','Han\'al vuole che tu uccida Titus Rivendare ancora una volta.','Uccidi Titus Rivendare','Ritorna da Han\'al','10440','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100063','2','1584','4290','Uccidi Thaurissan','Han\'al vuole che tu uccida Thaurissan ancora una volta.','Uccidi Thaurissan','Ritorna da Han\'al','9019','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100064','2','1584','4290','Uccidi Flamelash','Han\'al vuole che tu uccida Flamelash ancora una volta.','Uccidi Flamelash','Ritorna da Han\'al','9156','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100065','2','1477','4290','Uccidi Jammal\'an','Han\'al vuole che tu uccida Jammal\'an ancora una volta.','Uccidi Jammal\'an','Ritorna da Han\'al','5710','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100066','2','1477','4290','Uccidi Shade of Eranikus','Han\'al vuole che tu uccida Shade of Eranikus ancora una volta.','Uccidi Shade of Eranikus','Ritorna da Han\'al','5709','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100067','2','1583','4290','Uccidi Mother Smolderweb','Han\'al vuole che tu uccida Mother Smolderweb ancora una volta.','Uccidi Mother Smolderweb','Ritorna da Han\'al','10596','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100068','2','1583','4290','Uccidi Overlord Wyrmthalak','Han\'al vuole che tu uccida Overlord Wyrmthalak ancora una volta.','Uccidi Overlord Wyrmthalak','Ritorna da Han\'al','9568','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100069','2','3848','4290','Uccidi Harbinger Skyriss','Han\'al vuole che tu uccida Harbinger Skyriss ancora una volta.','Uccidi Harbinger Skyriss','Ritorna da Han\'al','20912','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100070','2','3715','4290','Uccidi Kalithresh','Han\'al vuole che tu uccida Kalithresh ancora una volta.','Uccidi Kalithresh','Ritorna da Han\'al','17798','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100071','2','3789','4290','Uccidi Murmur','Han\'al vuole che tu uccida Murmur ancora una volta.','Uccidi Murmur','Ritorna da Han\'al','18708','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100072','2','3714','4290','Uccidi Kargath Bladefist','Han\'al vuole che tu uccida Kargath Bladefist ancora una volta.','Uccidi Kargath Bladefist','Ritorna da Han\'al','16808','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100073','2','1941','4290','Uccidi Aeonus','Han\'al vuole che tu uccida Aeonus ancora una volta.','Uccidi Aeonus','Ritorna da Han\'al','17881','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100074','2','4131','4290','Uccidi Priestess Delrissa','Han\'al vuole che tu uccida Priestess Delrissa ancora una volta.','Uccidi Priestess Delrissa','Ritorna da Han\'al','24560','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100075','2','4100','4290','Uccidi Infinite Corruptor','Han\'al vuole che tu uccida Infinite Corruptor completando l\'evento dell\'instance.','Uccidi Infinite Corruptor','Ritorna da Han\'al','32273','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100076','2','4228','4290','Uccidi Ley-Guardian Eregos','Han\'al vuole che tu uccida Ley-Guardian Eregosancora una volta.','Uccidi Ley-Guardian Eregos','Ritorna da Han\'al','27656','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100077','2','4416','4290','Uccidi Gal\'darah','Han\'al vuole che tu uccida Gal\'darah ancora una volta.','Uccidi Gal\'darah','Ritorna da Han\'al','29306','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100078','2','4196','4290','Uccidi Tharon\'ja','Han\'al vuole che tu uccida Tharon\'ja ancora una volta.','Uccidi Tharon\'ja','Ritorna da Han\'al','26632','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100079','2','4494','4290','Uccidi Volazj','Han\'al vuole che tu uccida Volazj ancora una volta.','Uccidi Volazj','Ritorna da Han\'al','29311','1');
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`) VALUES('100080','2','2159','4290','Uccidi Onyxia','Han\'al vuole che tu uccida Onyxia ancora una volta.','Uccidi Onyxia','Ritorna da Han\'al','10184','1');
UPDATE quest_template SET `QuestLevel` = 80, minlevel = 80, OfferRewardText = "Bravo, $N", RequestItemsText = "Si, $N?" WHERE id >= 100000 AND id <= 100100;

View File

@@ -0,0 +1,119 @@
-- update quests with rep
UPDATE `quest_template` SET `Flags` = 4226, `RewardFactionID1` = 948, `RewardFactionValue1` = 0, RewardFactionOverride1 = 10 WHERE ID BETWEEN 100000 AND 100080;
-- mark of azeroth
UPDATE item_template SET NAME = "Mark of Azeroth", stackable = 2147483647, description = "Il bottino di ogni avventuriero!", maxcount = 0, spellid_1 = 0, spellcharges_1 = 0, flags = 0 WHERE entry = 37711;
-- quest rewards
UPDATE `quest_template` SET RewardItem1 = 37711, RewardAmount1 = 2 WHERE ID BETWEEN 100000 AND 100080;
-- hearthstone trasmog sack
UPDATE item_template SET NAME = "Garga's Magic Box", description = "Non sono così egocentrico da chiamare un NPC come me." WHERE entry = 32558;
DELETE FROM creature_questender WHERE id = 100001 AND quest <= 100080 AND quest >= 100000;
INSERT INTO creature_questender (id, quest) VALUES
(100001, 100000),
(100001, 100001),
(100001, 100002),
(100001, 100003),
(100001, 100004),
(100001, 100005),
(100001, 100006),
(100001, 100007),
(100001, 100008),
(100001, 100009),
(100001, 100010),
(100001, 100011),
(100001, 100012),
(100001, 100013),
(100001, 100014),
(100001, 100015),
(100001, 100016),
(100001, 100017),
(100001, 100018),
(100001, 100019),
(100001, 100020),
(100001, 100021),
(100001, 100022),
(100001, 100023),
(100001, 100024),
(100001, 100025),
(100001, 100026),
(100001, 100027),
(100001, 100028),
(100001, 100029),
(100001, 100030),
(100001, 100031),
(100001, 100032),
(100001, 100033),
(100001, 100034),
(100001, 100035),
(100001, 100036),
(100001, 100037),
(100001, 100038),
(100001, 100039),
(100001, 100040),
(100001, 100041),
(100001, 100042),
(100001, 100043),
(100001, 100044),
(100001, 100045),
(100001, 100046),
(100001, 100047),
(100001, 100048),
(100001, 100049),
(100001, 100050),
(100001, 100051),
(100001, 100052),
(100001, 100053),
(100001, 100054),
(100001, 100055),
(100001, 100056),
(100001, 100057),
(100001, 100058),
(100001, 100059),
(100001, 100060),
(100001, 100061),
(100001, 100062),
(100001, 100063),
(100001, 100064),
(100001, 100065),
(100001, 100066),
(100001, 100067),
(100001, 100068),
(100001, 100069),
(100001, 100070),
(100001, 100071),
(100001, 100072),
(100001, 100073),
(100001, 100074),
(100001, 100075),
(100001, 100076),
(100001, 100077),
(100001, 100078),
(100001, 100079),
(100001, 100080);
DELETE FROM `creature_template` WHERE (entry = 100001);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100001, 0, 0, 0, 0, 0, 10215, 0, 0, 0, 'Manaben', 'Han\'al Apprentice', NULL, 0, 80, 80, 0, 2007, 3, 1.1, 1.5, 1.2, 1, 0, 0, 0, 8, 33536, 2048, 0, 0, 0, 0, 0, 0, 7, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 10, 10, 1, 0, 0, 1, 0, 2, '', 12341);
UPDATE creature_template SET gossip_menu_id = 60000 WHERE entry = 100001;
DELETE FROM gossip_menu WHERE entry = 60000;
INSERT INTO gossip_menu (entry, text_id) VALUES (60000, 100010);
DELETE FROM npc_text WHERE ID = 100010;
INSERT INTO npc_text (ID, text0_0, text0_1, lang0, em0_0) VALUES
(100010, "Il Maestro è una persona molto stimata e famosa... aiutalo, e sarà generoso con te, $n!", 0, 0, 0);
-- UPDATE quest_template SET method = 0, TYPE = 0, flags = 4098, rewardfactionid1 = 69, rewardfactionvalueid1 = 6, RewardFactionValueIdOverride1 = 0, unknown0 = 1 WHERE id = 100000;
UPDATE quest_template SET QuestInfoID = 0, flags = 4098, RewardFactionID1 = 948, RewardFactionValue1 = 1, RewardFactionOverride1 = 0, unknown0 = 1 WHERE ID BETWEEN 100000 AND 100080;
DELETE FROM item_template WHERE entry >= 100017 AND entry <= 154806 AND subclass IN (0, 5, 7,8,9,10);
-- flag raid to raid quests
UPDATE `quest_template` SET `Flags` = 4290, QuestInfoID = 62 WHERE ID BETWEEN 100000 AND 100046;
UPDATE `quest_template` SET `Flags` = 4290, QuestInfoID = 62 WHERE ID = 100080;

View File

@@ -0,0 +1,151 @@
DELETE FROM npc_text WHERE ID IN (32001, 32010);
INSERT INTO npc_text (ID, text0_0, text0_1, lang0, em0_0) VALUES
(32001, "Qui si paga in Marks of Azeroth!", 0, 0, 0),
(32010, "Ti serve più reputazione!", 0, 0, 0);
-- Quartermaster Ozorg (Dk start set vendor)
-- FRIENDLY
DELETE FROM `creature_template` WHERE (entry = 100100);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100100, 0, 0, 0, 0, 0, 16214, 0, 0, 0, 'Quartermaster Ozorg', 'Acherus Quartermaster', '', 0, 72, 72, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
-- requires friendly with azerothshard (3000 rep)
UPDATE creature_template SET `npcflag` = 129, `unit_flags` = 768, `type_flags` = 134217728, `flags_extra` = 2, scriptname = "npc_azth_vendor", `type` = 6 WHERE entry = 100100;
DELETE FROM npc_vendor WHERE entry = 100100;
INSERT INTO npc_vendor (entry, item, extendedcost) VALUES
(100100, 38632, 3023), -- weapon
(100100, 38633, 3023), -- weapon
(100100, 38661, 3022), -- head
(100100, 38662, 3020), -- neck
(100100, 38663, 3022), -- shoulder
(100100, 38664, 3021), -- back
(100100, 38665, 3022), -- chest
(100100, 38666, 3021), -- bracer
(100100, 38667, 3022), -- hands
(100100, 38668, 3021), -- waist
(100100, 38669, 3022), -- leg
(100100, 38670, 3021), -- feet
(100100, 38671, 3020), -- ring
(100100, 38672, 3020), -- ring
(100100, 38674, 3020), -- trinket
(100100, 38675, 3020), -- trinket
(100100, 39320, 3021), -- back
(100100, 39322, 3021), -- back
(100100, 38707, 3023), -- weapon
(100100, 34648, 3021), -- feet
(100100, 34649, 3021), -- hands
(100100, 34650, 3022), -- chest
(100100, 34651, 3021), -- waist
(100100, 34652, 3022), -- head
(100100, 34653, 3021), -- wrist
(100100, 34655, 3021), -- shoulder
(100100, 34656, 3022), -- leg
(100100, 34657, 3020), -- neck
(100100, 34658, 3020), -- ring
(100100, 34659, 3021), -- back
(100100, 34661, 3023), -- weapon
(100100, 38147, 3020); -- ring
DELETE FROM npc_text WHERE ID = 32000;
INSERT INTO npc_text (ID, text0_0, text0_1, lang0, em0_0) VALUES
(32000, "Se tu vuoi comprare, tu dare me Marks of Azeroth!", 0, 0, 0);
UPDATE creature_template SET MovementType = 1 WHERE entry = 100100; -- set some random movement
-- T3 Vendor
-- HONORED
DELETE FROM `creature_template` WHERE (entry = 100101);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100101, 0, 0, 0, 0, 0, 10478, 0, 0, 0, 'Lord Raymond George', 'The Argent Dawn', '', 0, 72, 72, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
UPDATE creature_template SET `npcflag` = 129, `unit_flags` = 768, `type_flags` = 134217728, `flags_extra` = 2, scriptname = "npc_azth_vendor", `type` = 6 WHERE entry = 100101;
DELETE FROM npc_vendor WHERE entry = 100101;
INSERT INTO npc_vendor (entry, item, extendedcost) VALUES
(100101, 22349, 3025),
(100101, 22350, 3025),
(100101, 22351, 3025),
(100101, 22352, 3025),
(100101, 22353, 3025),
(100101, 22354, 3024),
(100101, 22355, 3024),
(100101, 22356, 3024),
(100101, 22357, 3024),
(100101, 22358, 3024),
(100101, 22359, 3025),
(100101, 22360, 3025),
(100101, 22361, 3024),
(100101, 22362, 3024),
(100101, 22363, 3024),
(100101, 22364, 3024),
(100101, 22365, 3024),
(100101, 22366, 3025),
(100101, 22367, 3025),
(100101, 22368, 3024),
(100101, 22369, 3024),
(100101, 22370, 3024),
(100101, 22371, 3024),
(100101, 22372, 3024),
(100101, 22373, 3021),
(100101, 22374, 3021),
(100101, 22375, 3021),
(100101, 22376, 3021);
DELETE FROM npc_text WHERE ID = 32002;
INSERT INTO npc_text (ID, text0_0, text0_1, lang0, em0_0) VALUES
(32002, "Salve, $N. Sei qui per aiutare gli Argent Dawn? I tuoi Marks of Azeroth saranno estremamente utili per le nostre spese...", 0, 0, 0);
-- Heirloom Vendor
-- Neutral
DELETE FROM `creature_template` WHERE (entry = 100102);
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`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(100102, 0, 0, 0, 0, 0, 3709, 0, 0, 0, 'Arsenio', '', '', 0, 80, 80, 1, 35, 128, 1, 1.14286, 1, 0, 0, 2000, 2000, 1, 33555202, 2048, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 4, 1, 1, 0, 0, 1, 0, 128, '', 12340);
UPDATE creature_template SET `npcflag` = 129, `unit_flags` = 768, `type_flags` = 134217728,
`flags_extra` = 2, scriptname = "npc_azth_vendor", `type` = 6 WHERE entry = 100102;
DELETE FROM npc_vendor WHERE entry = 100102;
INSERT INTO npc_vendor (entry, item, extendedcost) VALUES
(100102,'42943', 3023),
(100102,'42944', 3023),
(100102,'42945', 3023),
(100102,'42946', 3023),
(100102,'42947', 3023),
(100102,'42948', 3023),
(100102,'42949', 3023),
(100102,'42950', 3023),
(100102,'42951', 3023),
(100102,'42952', 3023),
(100102,'42984', 3023),
(100102,'42985', 3023),
(100102,'42991', 3023),
(100102,'42992', 3023),
(100102,'44091', 3023),
(100102,'44092', 3023),
(100102,'44093', 3023),
(100102,'44094', 3023),
(100102,'44095', 3023),
(100102,'44096', 3023),
(100102,'44097', 3023),
(100102,'44098', 3023),
(100102,'44099', 3023),
(100102,'44100', 3023),
(100102,'44101', 3023),
(100102,'44102', 3023),
(100102,'44103', 3023),
(100102,'44105', 3023),
(100102,'44107', 3023),
(100102,'48685', 3023),
(100102,'48691', 3023),
(100102,'48677', 3023),
(100102,'48687', 3023),
(100102,'48689', 3023),
(100102,'48683', 3023),
(100102,'48716', 3023),
(100102,'48718', 3023),
(100102,'50255', 3023);
DELETE FROM npc_text WHERE ID = 32003;
INSERT INTO npc_text (ID, text0_0, text0_1, lang0, em0_0) VALUES
(32003, "Hey, tu! Vuoi un po' di roba? L'ho rubat.. ricevuta giusto ieri... In cambio ti chiedo solo qualche Mark of Azeroth per delle... ehm.. ricerche...", 0, 0, 0);

View File

@@ -0,0 +1,216 @@
-- TIER 3 QUESTS
-- DRUID
UPDATE quest_template_addon SET AllowableClasses = 1024 WHERE `id` BETWEEN 9086 AND 9093;
DELETE FROM disables WHERE entry BETWEEN 9086 AND 9093;
DELETE FROM creature_questender WHERE quest BETWEEN 9086 AND 9093;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9086 AND 9093;
INSERT INTO creature_questender (id, quest) VALUES
(16135, 9086),
(16135, 9087),
(16135, 9088),
(16135, 9089),
(16135, 9090),
(16135, 9091),
(16135, 9092),
(16135, 9093);
INSERT INTO creature_queststarter (id, quest) VALUES
(16135, 9086),
(16135, 9087),
(16135, 9088),
(16135, 9089),
(16135, 9090),
(16135, 9091),
(16135, 9092),
(16135, 9093);
-- HUNTER
UPDATE quest_template_addon SET AllowableClasses = 4 WHERE id BETWEEN 9054 AND 9061;
DELETE FROM disables WHERE entry BETWEEN 9054 AND 9061;
DELETE FROM creature_questender WHERE quest BETWEEN 9054 AND 9061;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9054 AND 9061;
INSERT INTO creature_questender (id, quest) VALUES
(16132, 9054),
(16132, 9055),
(16132, 9056),
(16132, 9057),
(16132, 9058),
(16132, 9059),
(16132, 9060),
(16132, 9061);
INSERT INTO creature_queststarter (id, quest) VALUES
(16132, 9054),
(16132, 9055),
(16132, 9056),
(16132, 9057),
(16132, 9058),
(16132, 9059),
(16132, 9060),
(16132, 9061);
-- MAGE
UPDATE quest_template_addon SET AllowableClasses = 128 WHERE id BETWEEN 9095 AND 9102;
DELETE FROM disables WHERE entry BETWEEN 9095 AND 9102;
DELETE FROM creature_questender WHERE quest BETWEEN 9095 AND 9102;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9095 AND 9102;
INSERT INTO creature_questender (id, quest) VALUES
(16116, 9095),
(16116, 9096),
(16116, 9097),
(16116, 9098),
(16116, 9099),
(16116, 9100),
(16116, 9101),
(16116, 9102);
INSERT INTO creature_queststarter (id, quest) VALUES
(16116, 9095),
(16116, 9096),
(16116, 9097),
(16116, 9098),
(16116, 9099),
(16116, 9100),
(16116, 9101),
(16116, 9102);
-- PALADIN
UPDATE quest_template_addon SET AllowableClasses = 2 WHERE id BETWEEN 9043 AND 9050;
DELETE FROM disables WHERE entry BETWEEN 9043 AND 9050;
DELETE FROM creature_questender WHERE quest BETWEEN 9043 AND 9050;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9043 AND 9050;
INSERT INTO creature_questender (id, quest) VALUES
(16115, 9043),
(16115, 9044),
(16115, 9045),
(16115, 9046),
(16115, 9047),
(16115, 9048),
(16115, 9049),
(16115, 9050);
INSERT INTO creature_queststarter (id, quest) VALUES
(16115, 9043),
(16115, 9044),
(16115, 9045),
(16115, 9046),
(16115, 9047),
(16115, 9048),
(16115, 9049),
(16115, 9050);
-- PRIEST
UPDATE quest_template_addon SET AllowableClasses = 16 WHERE id BETWEEN 9111 AND 9118;
DELETE FROM disables WHERE entry BETWEEN 9111 AND 9118;
DELETE FROM creature_questender WHERE quest BETWEEN 9111 AND 9118;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9111 AND 9118;
INSERT INTO creature_questender (id, quest) VALUES
(16113, 9111),
(16113, 9112),
(16113, 9113),
(16113, 9114),
(16113, 9115),
(16113, 9116),
(16113, 9117),
(16113, 9118);
INSERT INTO creature_queststarter (id, quest) VALUES
(16113, 9043),
(16113, 9044),
(16113, 9045),
(16113, 9046),
(16113, 9047),
(16113, 9048),
(16113, 9049),
(16113, 9050);
-- ROGUE
UPDATE quest_template_addon SET AllowableClasses = 8 WHERE id BETWEEN 9077 AND 9084;
DELETE FROM disables WHERE entry BETWEEN 9077 AND 9084;
DELETE FROM creature_questender WHERE quest BETWEEN 9077 AND 9084;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9077 AND 9084;
INSERT INTO creature_questender (id, quest) VALUES
(16131, 9077),
(16131, 9078),
(16131, 9079),
(16131, 9080),
(16131, 9081),
(16131, 9082),
(16131, 9083),
(16131, 9084);
INSERT INTO creature_queststarter (id, quest) VALUES
(16131, 9077),
(16131, 9078),
(16131, 9079),
(16131, 9080),
(16131, 9081),
(16131, 9082),
(16131, 9083),
(16131, 9084);
-- SHAMAN
UPDATE quest_template_addon SET AllowableClasses = 64 WHERE id BETWEEN 9068 AND 9075;
DELETE FROM disables WHERE entry BETWEEN 9068 AND 9075;
DELETE FROM creature_questender WHERE quest BETWEEN 9068 AND 9075;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9068 AND 9075;
INSERT INTO creature_questender (id, quest) VALUES
(16134, 9068),
(16134, 9069),
(16134, 9070),
(16134, 9071),
(16134, 9072),
(16134, 9073),
(16134, 9074),
(16134, 9075);
INSERT INTO creature_queststarter (id, quest) VALUES
(16134, 9068),
(16134, 9069),
(16134, 9070),
(16134, 9071),
(16134, 9072),
(16134, 9073),
(16134, 9074),
(16134, 9075);
-- WARLOCK
UPDATE quest_template_addon SET AllowableClasses = 256 WHERE id BETWEEN 9103 AND 9110;
DELETE FROM disables WHERE entry BETWEEN 9103 AND 9110;
DELETE FROM creature_questender WHERE quest BETWEEN 9103 AND 9110;
DELETE FROM creature_queststarter WHERE quest BETWEEN 9103 AND 9110;
INSERT INTO creature_questender (id, quest) VALUES
(16133, 9103),
(16133, 9104),
(16133, 9105),
(16133, 9106),
(16133, 9107),
(16133, 9108),
(16133, 9109),
(16133, 9110);
INSERT INTO creature_queststarter (id, quest) VALUES
(16133, 9103),
(16133, 9104),
(16133, 9105),
(16133, 9106),
(16133, 9107),
(16133, 9108),
(16133, 9109),
(16133, 9110);
-- WARRIOR
UPDATE quest_template_addon SET AllowableClasses = 1 WHERE id = 9034 OR id BETWEEN 9036 AND 9042;
DELETE FROM disables WHERE entry = 9034 OR entry BETWEEN 9036 AND 9042;
DELETE FROM creature_questender WHERE quest = 9034 OR quest BETWEEN 9036 AND 9042;
DELETE FROM creature_queststarter WHERE quest = 9034 OR quest BETWEEN 9036 AND 9042;
INSERT INTO creature_questender (id, quest) VALUES
(16112, 9034),
(16112, 9036),
(16112, 9037),
(16112, 9038),
(16112, 9039),
(16112, 9040),
(16112, 9041),
(16112, 9042);
INSERT INTO creature_queststarter (id, quest) VALUES
(16112, 9034),
(16112, 9036),
(16112, 9037),
(16112, 9038),
(16112, 9039),
(16112, 9040),
(16112, 9041),
(16112, 9042);

View File

@@ -0,0 +1,216 @@
DELETE FROM creature_template WHERE entry >= 110000 AND entry <= 120000;
INSERT INTO creature_template (entry, killcredit1, modelid1, `name`, minlevel, maxlevel, faction, npcflag, unit_flags, unit_flags2, dynamicflags, flags_extra) VALUES
-- (110000, 110000, 17519, "Template", 1, 1, 14, 0, 0, 0, 0, 0),
(110001, 110001, 17519, "Alterac Valley Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110002, 110002, 17519, "Warsong Gulch Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110003, 110003, 17519, "Arathi Basin Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110004, 110004, 17519, "Eye of the Storm Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110005, 110005, 17519, "Strand of the Ancients Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110006, 110006, 17519, "Isle of Conquest Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110007, 110007, 17519, "Arathi Basin Flag Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110008, 110008, 17519, "Warsong Gulch Flag Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110009, 110009, 17519, "Warsong Gulch Flag Recover Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110010, 110010, 17519, "Eye of the Storm Flag Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110011, 110011, 17519, "Alterac Valley Graveyard Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110012, 110012, 17519, "Alterac Valley Tower Defense Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110013, 110013, 17519, "Alterac Valley Tower Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110014, 110014, 17519, "Arathi Basin Base Defense Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110015, 110015, 17519, "Alterac Valley Graveyard Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110016, 110016, 17519, "Isle of Conquest Base Capture Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110017, 110017, 17519, "Isle of Conquest Base Defend Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110018, 110018, 17519, "Kill a Warrior Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110019, 110019, 17519, "Kill a Paladin Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110020, 110020, 17519, "Kill a Hunter Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110021, 110021, 17519, "Kill a Rogue Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110022, 110022, 17519, "Kill a Priest Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110023, 110023, 17519, "Kill a Death Knight Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110024, 110024, 17519, "Kill a Shaman Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110025, 110025, 17519, "Kill a Mage Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110026, 110026, 17519, "Kill a Warlock Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110027, 110027, 17519, "Kill a Druid Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110028, 110028, 17519, "Kill a Human Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110029, 110029, 17519, "Kill an Orc Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110030, 110030, 17519, "Kill a Dwarf Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110031, 110031, 17519, "Kill a Night Elf Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110032, 110032, 17519, "Kill an Undead Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110033, 110033, 17519, "Kill a Tauren Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110034, 110034, 17519, "Kill a Gnome Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110035, 110035, 17519, "Kill a Troll Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110036, 110036, 17519, "Kill a Blood Elf Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110037, 110037, 17519, "Kill a Draenei Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110038, 110038, 17519, "Get a Killing Blow Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110039, 110039, 17519, "Earn Honorable Kill Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0),
(110040, 110040, 17519, "Win Duel Kill Credit", 1, 1, 14, 0, 0, 0, 0, 0)
;
-- debug quests
DELETE FROM quest_template WHERE id >= 110000 AND id <= 110039;
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`, ObjectiveText1) VALUES
('110000','2','3840','12482','Vinci Alterac Valley','Vinci Alterac Valley','Vinci Alterac Valley','Ritorna da Han\'al','110001','1', "Vinci Alterac Valley"),
('110001','2','3840','12482','Vinci Warsong Gulch','Vinci Warsong Gulch','Vinci Warsong Gulch','Ritorna da Han\'al','110002','1', "Vinci Warsong Gulch"),
(110002, '2','3840','12482', 'Vinci Arathi Basin', 'Vinci Arathi Basin', 'Vinci Arathi Basin', 'Ritorna da Han\'al', 110003, 1, 'Vinci Arathi Basin'),
(110003, '2','3840','12482', 'Vinci Eye of the Storm', 'Vinci Eye of the Storm', 'Vinci Eye of the Storm', 'Ritorna da Han\'al', 110004, 1, 'Vinci Eye of the Storm'),
(110004, '2','3840','12482', 'Vinci Strand of the Ancients', 'Vinci Strand of the Ancients', 'Vinci Strand of the Ancients', 'Ritorna da Han\'al', 110005, 1, 'Vinci Strand of the Ancients'),
(110005, '2','3840','12482', 'Vinci Isle of Conquest', 'Vinci Isle of Conquest', 'Vinci Isle of Conquest', 'Ritorna da Han\'al', 110006, 1, 'Vinci Isle of Conquest'),
(110006, '2','3840','12482', 'Arathi Basin Flag Capture', 'Arathi Basin Flag Capture', 'Arathi Basin Flag Capture', 'Ritorna da Han\'al', 110007, 1, 'Arathi Basin Flag Capture'),
(110007, '2','3840','12482', 'Warsong Gulch Flag Capture', 'Warsong Gulch Flag Capture', 'Warsong Gulch Flag Capture', 'Ritorna da Han\'al', 110008, 1, 'Warsong Gulch Flag Capture'),
(110008, '2','3840','12482', 'Warsong Gulch Flag Recover', 'Warsong Gulch Flag Recover', 'Warsong Gulch Flag Recover', 'Ritorna da Han\'al', 110009, 1, 'Warsong Gulch Flag Recover'),
(110009, '2','3840','12482', 'Eye of the Storm Flag Capture', 'Eye of the Storm Flag Capture', 'Eye of the Storm Flag Capture', 'Ritorna da Han\'al', 110010, 1, 'Eye of the Storm Flag Capture'),
(110010, '2','3840','12482', 'Alterac Valley Graveyard Capture', 'Alterac Valley Graveyard Capture', 'Alterac Valley Graveyard Capture', 'Ritorna da Han\'al', 110011, 1, 'Alterac Valley Graveyard Capture'),
(110011, '2','3840','12482', 'Alterac Valley Tower Defense', 'Alterac Valley Tower Defense', 'Alterac Valley Tower Defense', 'Ritorna da Han\'al', 110012, 1, 'Alterac Valley Tower Defense'),
(110012, '2','3840','12482', 'Alterac Valley Tower Capture', 'Alterac Valley Tower Capture', 'Alterac Valley Tower Capture', 'Ritorna da Han\'al', 110013, 1, 'Alterac Valley Tower Capture'),
(110013, '2','3840','12482', 'Arathi Basin Base Defense', 'Arathi Basin Base Defense', 'Arathi Basin Base Defense', 'Ritorna da Han\'al', 110014, 1, 'Arathi Basin Base Defense'),
(110014, '2','3840','12482', 'Alterac Valley Graveyard Capture', 'Alterac Valley Graveyard Capture', 'Alterac Valley Graveyard Capture', 'Ritorna da Han\'al', 110015, 1, 'Alterac Valley Graveyard Capture'),
(110015, '2','3840','12482', 'Isle of Conquest Base Capture', 'Isle of Conquest Base Capture', 'Isle of Conquest Base Capture', 'Ritorna da Han\'al', 110016, 1, 'Isle of Conquest Base Capture'),
(110016, '2','3840','12482', 'Isle of Conquest Base Defend', 'Isle of Conquest Base Defend', 'Isle of Conquest Base Defend', 'Ritorna da Han\'al', 110017, 1, 'Isle of Conquest Base Defend'),
(110017, '2','3840','12482', 'Kill a Warrior', 'Kill a Warrior', 'Kill a Warrior', 'Ritorna da Han\'al', 110018, 1, 'Kill a Warrior'),
(110018, '2','3840','12482', 'Kill a Paladin', 'Kill a Paladin', 'Kill a Paladin', 'Ritorna da Han\'al', 110019, 1, 'Kill a Paladin'),
(110019, '2','3840','12482', 'Kill a Hunter', 'Kill a Hunter', 'Kill a Hunter', 'Ritorna da Han\'al', 110020, 1, 'Kill a Hunter'),
(110020, '2','3840','12482', 'Kill a Rogue', 'Kill a Rogue', 'Kill a Rogue', 'Ritorna da Han\'al', 110021, 1, 'Kill a Rogue'),
(110021, '2','3840','12482', 'Kill a Priest', 'Kill a Priest', 'Kill a Priest', 'Ritorna da Han\'al', 110022, 1, 'Kill a Priest'),
(110022, '2','3840','12482', 'Kill a Death Knight', 'Kill a Death Knight', 'Kill a Death Knight', 'Ritorna da Han\'al', 110023, 1, 'Kill a Death Knight'),
(110023, '2','3840','12482', 'Kill a Shaman', 'Kill a Shaman', 'Kill a Shaman', 'Ritorna da Han\'al', 110024, 1, 'Kill a Shaman'),
(110024, '2','3840','12482', 'Kill a Mage', 'Kill a Mage', 'Kill a Mage', 'Ritorna da Han\'al', 110025, 1, 'Kill a Mage'),
(110025, '2','3840','12482', 'Kill a Warlock', 'Kill a Warlock', 'Kill a Warlock', 'Ritorna da Han\'al', 110026, 1, 'Kill a Warlock'),
(110026, '2','3840','12482', 'Kill a Druid', 'Kill a Druid', 'Kill a Druid', 'Ritorna da Han\'al', 110027, 1, 'Kill a Druid'),
(110027, '2','3840','12482', 'Kill a Human', 'Kill a Human', 'Kill a Human', 'Ritorna da Han\'al', 110028, 1, 'Kill a Human'),
(110028, '2','3840','12482', 'Kill an Orc', 'Kill an Orc', 'Kill an Orc', 'Ritorna da Han\'al', 110029, 1, 'Kill an Orc'),
(110029, '2','3840','12482', 'Kill a Dwarf', 'Kill a Dwarf', 'Kill a Dwarf', 'Ritorna da Han\'al', 110030, 1, 'Kill a Dwarf'),
(110030, '2','3840','12482', 'Kill a Night Elf', 'Kill a Night Elf', 'Kill a Night Elf', 'Ritorna da Han\'al', 110031, 1, 'Kill a Night Elf'),
(110031, '2','3840','12482', 'Kill an Undead', 'Kill an Undead', 'Kill an Undead', 'Ritorna da Han\'al', 110032, 1, 'Kill an Undead'),
(110032, '2','3840','12482', 'Kill a Tauren', 'Kill a Tauren', 'Kill a Tauren', 'Ritorna da Han\'al', 110033, 1, 'Kill a Tauren'),
(110033, '2','3840','12482', 'Kill a Gnome', 'Kill a Gnome', 'Kill a Gnome', 'Ritorna da Han\'al', 110034, 1, 'Kill a Gnome'),
(110034, '2','3840','12482', 'Kill a Troll', 'Kill a Troll', 'Kill a Troll', 'Ritorna da Han\'al', 110035, 1, 'Kill a Troll'),
(110035, '2','3840','12482', 'Kill a Blood Elf', 'Kill a Blood Elf', 'Kill a Blood Elf', 'Ritorna da Han\'al', 110036, 1, 'Kill a Blood Elf'),
(110036, '2','3840','12482', 'Kill a Draenei', 'Kill a Draenei', 'Kill a Draenei', 'Ritorna da Han\'al', 110037, 1, 'Kill a Draenei'),
(110037, '2','3840','12482', 'Get a Killing Blow', 'Get a Killing Blow', 'Get a Killing Blow', 'Ritorna da Han\'al', 110038, 1, 'Get a Killing Blow'),
(110038, '2','3840','12482', 'Earn Honorable Kill', 'Earn Honorable Kill', 'Earn Honorable Kill', 'Ritorna da Han\'al', 110039, 1, 'Earn Honorable Kill'),
(110039, '2','3840','12482', 'Win Duel', 'Win Duel', 'Win Duel', 'Ritorna da Han\'al', 110040, 1, 'Win Duel')
;
UPDATE quest_template SET minlevel = 80, OfferRewardText = "Bravo, $N", RequestItemsText = "Si, $N?" WHERE id >= 110000 AND id <= 110300;
-- real quests
DELETE FROM quest_template WHERE id >= 110040 AND id <= 110095;
INSERT INTO `quest_template` (`id`, `QuestInfoID`, `QuestSortID`, `Flags`, `LogTitle`, `LogDescription`, `QuestDescription`, `OfferRewardText`, `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`, ObjectiveText1, RewardItem1, RewardAmount1) VALUES
(110040,'2','3840','12482','Vinci 2 Warsong Gulch','Vai, $N, la battaglia di Warsong Gulch ti attende! Da sempre orchi ed elfi della notte si sfidano in quelle terre... Prendi parte al conflitto e torna vittorioso a raccontarmelo!','Vinci Warsong Gulch','Ritorna da Han\'al','110002','2', "Warsong Gulch vinti", 37711, 2),
(110041,'2','3840','12482','Vinci 4 Warsong Gulch','Vai, $N, la battaglia di Warsong Gulch ti attende! Da sempre orchi ed elfi della notte si sfidano in quelle terre... Prendi parte al conflitto e torna vittorioso a raccontarmelo!','Vinci Warsong Gulch','Ritorna da Han\'al','110002','4', "Warsong Gulch vinti", 37711, 3),
(110042,'2','3840','12482','Vinci 2 Arathi Basin','Vai, $N, la battaglia di Arathi Basin ti attende! I Forsaken e la Lega di Arathor cercano di accumulare le ricchezze del luogo... aiuta una delle due parti e torna vincitore a raccontarmelo!','Vinci Arathi Basin','Ritorna da Han\'al','110003','2', "Arathi Basin vinti", 37711, 2),
(110043,'2','3840','12482','Vinci 4 Arathi Basin','Vai, $N, la battaglia di Arathi Basin ti attende! I Forsaken e la Lega di Arathor cercano di accumulare le ricchezze del luogo... aiuta una delle due parti e torna vincitore a raccontarmelo!','Vinci Arathi Basin','Ritorna da Han\'al','110003','4', "Arathi Basin vinti", 37711, 3),
(110044,'2','3840','12482','Vinci 2 Eye of the Storm','Vai, $N, la battaglia di Eye of the Storm ti attende! Corri a Netherstorm e prendi parte al conflitto... torna vittorioso a raccontarmelo!','Vinci Eye of the Storm','Ritorna da Han\'al','110004','2', "Eye of the Storm vinti", 37711, 2),
(110045,'2','3840','12482','Vinci 4 Eye of the Storm','Vai, $N, la battaglia di Eye of the Storm ti attende! Corri a Netherstorm e prendi parte al conflitto... torna vittorioso a raccontarmelo!','Vinci Eye of the Storm','Ritorna da Han\'al','110004','4', "Eye of the Storm vinti", 37711, 3),
(110046,'2','3840','12482','Cattura 3 flag in Arathi Basin','Cattura 3 flag in Arathi Basin!','Cattura 3 flag in Arathi Basin','Ritorna da Han\'al','110007','3', "Arathi Basin flag catturate", 37711, 2),
(110047,'2','3840','12482','Cattura 5 flag in Arathi Basin','Cattura 5 flag in Arathi Basin!','Cattura 5 flag in Arathi Basin','Ritorna da Han\'al','110007','5', "Arathi Basin flag catturate", 37711, 3),
(110048,'2','3840','12482','Cattura 3 flag in Warsong Gulch','Cattura 3 flag in Warsong Gulch!','Cattura 3 flag in Warsong Gulch','Ritorna da Han\'al','110008','3', "Warsong Gulch flag catturate", 37711, 2),
(110049,'2','3840','12482','Cattura 5 flag in Warsong Gulch','Cattura 5 flag in Warsong Gulch!','Cattura 5 flag in Warsong Gulch','Ritorna da Han\'al','110008','5', "Warsong Gulch flag catturate", 37711, 3),
(110050,'2','3840','12482','Recupera 2 flag in Warsong Gulch','Recupera 2 flag in Warsong Gulch!','Recupera 2 flag in Warsong Gulch','Ritorna da Han\'al','110009','2', "Warsong Gulch flag recuperate", 37711, 2),
(110051,'2','3840','12482','Recupera 3 flag in Warsong Gulch','Recupera 3 flag in Warsong Gulch!','Recupera 3 flag in Warsong Gulch','Ritorna da Han\'al','110009','3', "Warsong Gulch flag recuperate", 37711, 3),
(110052,'2','3840','12482','Cattura 2 flag in Eye of the Storm','Cattura 2 flag in Eye of the Storm!','Cattura 2 flag in Eye of the Storm','Ritorna da Han\'al','110010','2', "Eye of the Storm flag catturate", 37711, 2),
(110053,'2','3840','12482','Cattura 4 flag in Eye of the Storm','Cattura 4 flag in Eye of the Storm!','Cattura 4 flag in Eye of the Storm','Ritorna da Han\'al','110010','4', "Eye of the Storm flag catturate", 37711, 3),
(110054,'2','3840','12482','Difendi 3 basi in Arathi Basin','Difendi 3 basi in Arathi Basin!','Difendi 3 basi in Arathi Basin','Ritorna da Han\'al','110014','3', "Arathi Basin basi difese", 37711, 2),
(110055,'2','3840','12482','Difendi 5 basi in Arathi Basin','Difendi 5 basi in Arathi Basin!','Difendi 5 basi in Arathi Basin','Ritorna da Han\'al','110014','5', "Arathi Basin basi difese", 37711, 3),
(110056,'2','3840','12482','Nerfate il Bladestorm','Uccidi 5 Warrior','Uccidi 5 Warrior','Ritorna da Han\'al','110018','5', "Warrior Uccisi", 37711, 2),
(110057,'2','3840','12482','Mortal Strike op','Uccidi 10 Warrior','Uccidi 10 Warrior','Ritorna da Han\'al','110018','10', "Warrior Uccisi", 37711, 3),
(110058,'2','3840','12482','Come li uccido se hanno il Divine Shield?','Uccidi 5 Paladin','Uccidi 5 Paladin','Ritorna da Han\'al','110019','5', "Paladin Uccisi", 37711, 2),
(110059,'2','3840','12482','Odio per i pala','Uccidi 10 Paladin','Uccidi 10 Paladin','Ritorna da Han\'al','110019','10', "Paladin Uccisi", 37711, 3),
(110060,'2','3840','12482','Uccidili prima che ti uccidano','Uccidi 5 Hunter','Uccidi 5 Hunter','Ritorna da Han\'al','110020','5', "Hunter Uccisi", 37711, 2),
(110061,'2','3840','12482','Tanto hanno quaranta Deterrance','Uccidi 10 Hunter','Uccidi 10 Hunter','Ritorna da Han\'al','110020','10', "Warrior Hunter", 37711, 3),
(110062,'2','3840','12482','They do it from behind','Uccidi 5 Rogue','Uccidi 5 Rogue','Ritorna da Han\'al','110021','5', "Rogue Uccisi", 37711, 2),
(110063,'2','3840','12482','Stai per uccidermi? LOL no, vanish, cos, sprint, bye','Uccidi 10 Rogue','Uccidi 10 Rogue','Ritorna da Han\'al','110021','10', "Rogue Uccisi", 37711, 3),
(110064,'2','3840','12482','Ma è Illidan? Ah, no :,(','Uccidi 5 Warlock','Uccidi 5 Warlock','Ritorna da Han\'al','110026','5', "Warlock Uccisi", 37711, 2),
(110065,'2','3840','12482','Fear, fear, fear','Uccidi 10 Warlock','Uccidi 10 Warlock','Ritorna da Han\'al','110026','10', "Warlock Uccisi", 37711, 3),
(110066,'2','3840','12482','Tanto va in Bear Form e diventa immortale...','Uccidi 5 Druid','Uccidi 5 Druid','Ritorna da Han\'al','110027','5', "Druid Uccisi", 37711, 2),
(110067,'2','3840','12482','Orsopollooo','Uccidi 10 Druid','Uccidi 10 Druid','Ritorna da Han\'al','110027','10', "Druid Uccisi", 37711, 3),
(110068,'2','3840','12482','Ognuno per sè?','Uccidi 4 Human','Uccidi 4 Human','Ritorna da Han\'al','110028','4', "Human Uccisi", 37711, 2),
(110069,'2','3840','12482','Massacro a Stormwind','Uccidi 7 Human','Uccidi 7 Human','Ritorna da Han\'al','110028','7', "Human Uccisi", 37711, 3),
(110070,'2','3840','12482','Orgrimmar reputation','Uccidi 4 Orc','Uccidi 4 Orc','Ritorna da Han\'al','110029','4', "Orc Uccisi", 37711, 2),
(110071,'2','3840','12482','Ma non assomiglia a Shrek','Uccidi 7 Orc','Uccidi 7 Orc','Ritorna da Han\'al','110029','7', "Orc Uccisi", 37711, 3),
(110072,'2','3840','12482','Ma non è uno gnomo?','Uccidi 4 Dwarf','Uccidi 4 Dwarf','Ritorna da Han\'al','110030','4', "Dwarf Uccisi", 37711, 2),
(110073,'2','3840','12482','Re Magni in pensione','Uccidi 7 Dwarf','Uccidi 7 Dwarf','Ritorna da Han\'al','110030','7', "Dwarf Uccisi", 37711, 3),
(110074,'2','3840','12482','Taglialegna','Uccidi 4 Night Elf','Uccidi 4 Night Elf','Ritorna da Han\'al','110031','4', "Night Elf Uccisi", 37711, 2),
(110075,'2','3840','12482','Ma non erano buggati?','Uccidi 7 Night Elf','Uccidi 7 Night Elf','Ritorna da Han\'al','110031','7', "Night Elf Uccisi", 37711, 3),
(110076,'2','3840','12482','Ma è già morto...','Uccidi 4 Undead','Uccidi 4 Undead','Ritorna da Han\'al','110032','4', "Undead Uccisi", 37711, 2),
(110077,'2','3840','12482','Mmm... che profumino...','Uccidi 7 Undead','Uccidi 7 Undead','Ritorna da Han\'al','110032','7', "Undead Uccisi", 37711, 3),
(110078,'2','3840','12482','Mucche Killer','Uccidi 4 Tauren','Uccidi 4 Tauren','Ritorna da Han\'al','110033','4', "Tauren Uccisi", 37711, 2),
(110079,'2','3840','12482','Tutti cornuti','Uccidi 7 Tauren','Uccidi 7 Tauren','Ritorna da Han\'al','110033','7', "Tauren Uccisi", 37711, 3),
(110080,'2','3840','12482','Non si distinguono','Uccidi 4 Gnome','Uccidi 4 Gnome','Ritorna da Han\'al','110034','4', "Gnome Uccisi", 37711, 2),
(110081,'2','3840','12482','Basso è bello','Uccidi 7 Gnome','Uccidi 7 Gnome','Ritorna da Han\'al','110034','7', "Gnome Uccisi", 37711, 3),
(110082,'2','3840','12482','Rock and Troll','Uccidi 4 Troll','Uccidi 4 Troll','Ritorna da Han\'al','110035','4', "Troll Uccisi", 37711, 2),
(110083,'2','3840','12482','Vodoo is life','Uccidi 7 Troll','Uccidi 7 Troll','Ritorna da Han\'al','110035','7', "Troll Uccisi", 37711, 3),
(110084,'2','3840','12482','Sig Nicious I love you','Uccidi 4 Blood Elf','Uccidi 4 Blood Elf','Ritorna da Han\'al','110036','4', "Blood Elf Uccisi", 37711, 2),
(110085,'2','3840','12482','Preferivo senza Sunwell','Uccidi 7 Blood Elf','Uccidi 7 Blood Elf','Ritorna da Han\'al','110036','7', "Blood Elf Uccisi", 37711, 3),
(110086,'2','3840','12482','Rimandateli sul loro pianeta! Ruspa!','Uccidi 4 Draenei','Uccidi 4 Draenei','Ritorna da Han\'al','110037','4', "Draenei Uccisi", 37711, 2),
(110087,'2','3840','12482','Odio per i Draenei','Uccidi 7 Draenei','Uccidi 7 Draenei','Ritorna da Han\'al','110037','7', "Draenei Uccisi", 37711, 3),
(110088,'2','3840','12482','Occhio al Mind Control','Uccidi 5 Priest','Uccidi 5 Priest','Ritorna da Han\'al','110022','5', "Priest Uccisi", 37711, 2),
(110089,'2','3840','12482','Tanto ti shottano anche da Disci...','Uccidi 10 Priest','Uccidi 10 Priest','Ritorna da Han\'al','110022','10', "Priest Uccisi", 37711, 3),
(110090,'2','3840','12482','Incubo per i caster','Uccidi 5 Death Knight','Uccidi 5 Death Knight','Ritorna da Han\'al','110023','5', "Death Knight Uccisi", 37711, 2),
(110091,'2','3840','12482','Ah, ma è immune agli stun??','Uccidi 10 Death Knight','Uccidi 10 Death Knight','Ritorna da Han\'al','110023','10', "Death Knight Uccisi", 37711, 3),
(110092,'2','3840','12482','Non fanno abbastanza danno','Uccidi 5 Shaman','Uccidi 5 Shaman','Ritorna da Han\'al','110024','5', "Shaman Uccisi", 37711, 2),
(110093,'2','3840','12482','Ma quello è un Lava Bur..','Uccidi 10 Shaman','Uccidi 10 Shaman','Ritorna da Han\'al','110024','10', "Shaman Uccisi", 37711, 3),
(110094,'2','3840','12482','Ice Barrier indistruttibile','Uccidi 5 Mage','Uccidi 5 Mage','Ritorna da Han\'al','110025','5', "Mage Uccisi", 37711, 2),
(110095,'2','3840','12482','Ma quanto scappa col Blink?!','Uccidi 10 Mage','Uccidi 10 Mage','Ritorna da Han\'al','110025','10', "Mage Uccisi", 37711, 3);
UPDATE quest_template SET minlevel = 80, questlevel = 80, OfferRewardText = "Bravo, $N", RequestItemsText = "Si, $N?" WHERE id >= 110040 AND id <= 110095;
UPDATE quest_template SET QuestInfoID = 41, flags = 4098, RewardFactionID1 = 948, RewardFactionValue1 = 1, RewardFactionOverride1 = 0, unknown0 = 1, QuestSortID = -241 WHERE id >= 110040 AND id <= 110095;
DELETE FROM creature_questender WHERE id = 100001 AND quest >= 110040 AND quest <= 110095;
INSERT INTO creature_questender (id, quest) VALUES
(100001, 110040),
(100001, 110041),
(100001, 110042),
(100001, 110043),
(100001, 110044),
(100001, 110045),
(100001, 110046),
(100001, 110047),
(100001, 110048),
(100001, 110049),
(100001, 110050),
(100001, 110051),
(100001, 110052),
(100001, 110053),
(100001, 110054),
(100001, 110055),
(100001, 110056),
(100001, 110057),
(100001, 110058),
(100001, 110059),
(100001, 110060),
(100001, 110061),
(100001, 110062),
(100001, 110063),
(100001, 110064),
(100001, 110065),
(100001, 110066),
(100001, 110067),
(100001, 110068),
(100001, 110069),
(100001, 110070),
(100001, 110071),
(100001, 110072),
(100001, 110073),
(100001, 110074),
(100001, 110075),
(100001, 110076),
(100001, 110077),
(100001, 110078),
(100001, 110079),
(100001, 110080),
(100001, 110081),
(100001, 110082),
(100001, 110083),
(100001, 110084),
(100001, 110085),
(100001, 110086),
(100001, 110087),
(100001, 110088),
(100001, 110089),
(100001, 110090),
(100001, 110091),
(100001, 110092),
(100001, 110093),
(100001, 110094),
(100001, 110095);
UPDATE quest_template SET LogDescription = CONCAT(LogDescription, " in Battleground.") WHERE id <= 110095 AND id > 110055;

View File

@@ -0,0 +1,61 @@
SET @ENTRY:=110000;
SET @MIN:=20;
SET @MAX:=20;
SET @NAME:="Sack of Marks";
SET @DESCRIPTION:="Contiente 20 Marks of Azeroth";
SET @EXTCOST:=3022;
DELETE FROM `item_template` WHERE (entry = @ENTRY);
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `VerifiedBuild`) VALUES
(@ENTRY, 15, 0, -1, @NAME, 4056, 1, 4, 0, 1, 0, 0, 0, -1, -1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, @DESCRIPTION, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 12340);
DELETE FROM `item_loot_template` WHERE (entry = @ENTRY);
INSERT INTO `item_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@ENTRY, 37711, 100, 1, 0, @MIN, @MAX);
DELETE FROM npc_vendor WHERE item = @ENTRY;
INSERT INTO npc_vendor VALUES (100002, 0, @ENTRY, 0, 0, @EXTCOST);
SET @ENTRY:=110001;
SET @MIN:=5;
SET @MAX:=5;
SET @NAME:="Sack of Marks";
SET @DESCRIPTION:="Contiente 5 Marks of Azeroth";
SET @EXTCOST:=3020;
DELETE FROM `item_template` WHERE (entry = @ENTRY);
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `VerifiedBuild`) VALUES
(@ENTRY, 15, 0, -1, @NAME, 4056, 1, 4, 0, 1, 0, 0, 0, -1, -1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, @DESCRIPTION, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 12340);
DELETE FROM `item_loot_template` WHERE (entry = @ENTRY);
INSERT INTO `item_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@ENTRY, 37711, 100, 1, 0, @MIN, @MAX);
DELETE FROM npc_vendor WHERE item = @ENTRY;
INSERT INTO npc_vendor VALUES (100002, 0, @ENTRY, 0, 0, @EXTCOST);
SET @ENTRY:=110002;
SET @MIN:=100;
SET @MAX:=100;
SET @NAME:="Sack of Marks";
SET @DESCRIPTION:="Contiente 100 Marks of Azeroth";
SET @EXTCOST:=3025;
DELETE FROM `item_template` WHERE (entry = @ENTRY);
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `VerifiedBuild`) VALUES
(@ENTRY, 15, 0, -1, @NAME, 4056, 1, 4, 0, 1, 0, 0, 0, -1, -1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, @DESCRIPTION, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 12340);
DELETE FROM `item_loot_template` WHERE (entry = @ENTRY);
INSERT INTO `item_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@ENTRY, 37711, 100, 1, 0, @MIN, @MAX);
DELETE FROM npc_vendor WHERE item = @ENTRY;
INSERT INTO npc_vendor VALUES (100002, 0, @ENTRY, 0, 0, @EXTCOST);

View File

@@ -0,0 +1,2 @@
-- update daily quests reward to 75
UPDATE quest_template SET RewardFactionValue1 = 3 WHERE (id <= 110095 AND id >= 110040) OR (id >= 100000 AND id <= 100100);

View File

@@ -0,0 +1,11 @@
-- First query is the daily quest
-- RewardFactionValue1 = 3 -> 75
-- RewardFactionValue1 = 1 -> 25
UPDATE quest_template SET RewardFactionID1 = 948, RewardFactionValue1 = 3, RewardItem2 = 37711, RewardAmount2 = 3 WHERE id IN (SELECT firstQuestId FROM lfg_dungeon_rewards);
-- this second query is always completed at each dungeon (except the first)
--
UPDATE quest_template SET RewardFactionID1 = 948, RewardFactionValue1 = 1 WHERE id IN (SELECT otherQuestId FROM lfg_dungeon_rewards);
-- revert
-- update quest_template set RewardFactionID1 = 0, RewardFactionValue1 = 0, RewardItem2 = 0, RewardAmount2 = 0 where id IN (SELECT firstQuestId FROM lfg_dungeon_rewards ) OR id IN (SELECT otherQuestId FROM lfg_dungeon_rewards);

View File

@@ -0,0 +1,56 @@
UPDATE quest_template SET LogTitle = '2 Warsong Gulch Victories' WHERE id = 110040;
UPDATE quest_template SET LogTitle = '4 Warsong Gulch Victories' WHERE id = 110041;
UPDATE quest_template SET LogTitle = '2 Arathi Basin Victories' WHERE id = 110042;
UPDATE quest_template SET LogTitle = '4 Arathi Basin Victories' WHERE id = 110043;
UPDATE quest_template SET LogTitle = '2 Eye of the Storm Victories' WHERE id = 110044;
UPDATE quest_template SET LogTitle = '4 Eye of the Storm Victories' WHERE id = 110045;
UPDATE quest_template SET LogTitle = 'Defend 3 bases on Arathi Basin' WHERE id = 110046;
UPDATE quest_template SET LogTitle = 'Defend 5 bases on Arathi Basin' WHERE id = 110047;
UPDATE quest_template SET LogTitle = 'Capture 3 flags on Warsong Gulch' WHERE id = 110048;
UPDATE quest_template SET LogTitle = 'Capture 5 flags on Warsong Gulch' WHERE id = 110049;
UPDATE quest_template SET LogTitle = 'Recover 2 flags on Warsong Gulch' WHERE id = 110050;
UPDATE quest_template SET LogTitle = 'Recover 4 flags on Warsong Gulch' WHERE id = 110051;
UPDATE quest_template SET LogTitle = 'Capture 2 flags on Eye of the Storm' WHERE id = 110052;
UPDATE quest_template SET LogTitle = 'Capture 4 flags on Eye of the Storm' WHERE id = 110053;
UPDATE quest_template SET LogTitle = 'Take 3 bases on Arathi Basin' WHERE id = 110054;
UPDATE quest_template SET LogTitle = 'Take 5 bases on Arathi Basin' WHERE id = 110055;
UPDATE quest_template SET LogTitle = 'Nerf Bladestorm pls' WHERE id = 110056;
UPDATE quest_template SET LogTitle = 'Mortal Strike OP' WHERE id = 110057;
UPDATE quest_template SET LogTitle = 'How can I kill them in Divine Shield?' WHERE id = 110058;
UPDATE quest_template SET LogTitle = 'I frickin\' hate paladins!' WHERE id = 110059;
UPDATE quest_template SET LogTitle = 'Kill them before they Kill Shot you..' WHERE id = 110060;
UPDATE quest_template SET LogTitle = 'Nevermind, here comes another Deterrence' WHERE id = 110061;
UPDATE quest_template SET LogTitle = 'They do it from behind' WHERE id = 110062;
UPDATE quest_template SET LogTitle = 'Are you killing me? Lol, nope' WHERE id = 110063;
UPDATE quest_template SET LogTitle = 'IS THAT ILLIDA.. Ah, no :(' WHERE id = 110064;
UPDATE quest_template SET LogTitle = 'Fear, fear, fear, repeat in 15' WHERE id = 110065;
UPDATE quest_template SET LogTitle = 'Why focus him, he has Bear Form..' WHERE id = 110066;
UPDATE quest_template SET LogTitle = 'That is a bear! No, that is an owl! Bearowl!' WHERE id = 110067;
UPDATE quest_template SET LogTitle = 'Every man for himself?' WHERE id = 110068;
UPDATE quest_template SET LogTitle = 'Bloodshed in Stormwind' WHERE id = 110069;
UPDATE quest_template SET LogTitle = 'Runecloth for Orgrimmar reputation' WHERE id = 110070;
UPDATE quest_template SET LogTitle = 'Shrek is love, Shrek is life' WHERE id = 110071;
UPDATE quest_template SET LogTitle = 'Wait, isn\'t it a Gnome?' WHERE id = 110072;
UPDATE quest_template SET LogTitle = 'You mean the uglier Dwarf?' WHERE id = 110073;
UPDATE quest_template SET LogTitle = 'Triggered by lumberjacks' WHERE id = 110074;
UPDATE quest_template SET LogTitle = 'Teldrassil definitely has the high ground' WHERE id = 110075;
UPDATE quest_template SET LogTitle = 'Wait, they are already dead!' WHERE id = 110076;
UPDATE quest_template SET LogTitle = 'Mmm.. what a nice smell' WHERE id = 110077;
UPDATE quest_template SET LogTitle = 'Killer cows' WHERE id = 110078;
UPDATE quest_template SET LogTitle = 'You can\'t milk those' WHERE id = 110079;
UPDATE quest_template SET LogTitle = 'The smaller, the better' WHERE id = 110080;
UPDATE quest_template SET LogTitle = 'Size does not matter' WHERE id = 110081;
UPDATE quest_template SET LogTitle = 'Rock and troll' WHERE id = 110082;
UPDATE quest_template SET LogTitle = 'Vodoo dolls for everyone' WHERE id = 110083;
UPDATE quest_template SET LogTitle = 'Sig Nicious I love you' WHERE id = 110084;
UPDATE quest_template SET LogTitle = 'Merely a setback' WHERE id = 110085;
UPDATE quest_template SET LogTitle = 'Send them back to their planet! Wall!' WHERE id = 110086;
UPDATE quest_template SET LogTitle = 'Hunted by everyone' WHERE id = 110087;
UPDATE quest_template SET LogTitle = 'Shadowreaper Anduin is way too OP' WHERE id = 110088;
UPDATE quest_template SET LogTitle = 'Discipline priest OP damage' WHERE id = 110089;
UPDATE quest_template SET LogTitle = 'Wait, I can\'t stun him?' WHERE id = 110090;
UPDATE quest_template SET LogTitle = 'Anti-magic shell because we hate casters' WHERE id = 110091;
UPDATE quest_template SET LogTitle = 'Is that a Lava Bur..' WHERE id = 110092;
UPDATE quest_template SET LogTitle = 'Destroy that totem! And that one! And..' WHERE id = 110093;
UPDATE quest_template SET LogTitle = 'Ice Barrier absorbs too much' WHERE id = 110094;
UPDATE quest_template SET LogTitle = 'Stop Blinking, I hate you' WHERE id = 110095;

View File

@@ -0,0 +1,13 @@
DROP TABLE IF EXISTS `creature_alias`;
CREATE TABLE `creature_alias` (
`guid` BIGINT(15) NOT NULL COMMENT 'guid from creature',
`alias` CHAR(15) DEFAULT NULL,
PRIMARY KEY (`guid`)
);
DROP TABLE IF EXISTS `gameobject_alias`;
CREATE TABLE `gameobject_alias` (
`guid` BIGINT(15) NOT NULL COMMENT 'guid from creature',
`alias` CHAR(15) DEFAULT NULL,
PRIMARY KEY (`guid`)
);

View File

@@ -0,0 +1,536 @@
#
# EDIT DEFAULT PERMISSIONS
#
# lvl 0: Player
# lvl 1: GM T1
# lvl 2: Entertainer/Story Teller
# lvl 3: GM T2
# lvl 4: Administrator
#
# NOTE: use "[^a-z,\,] as regexp to search rows without comma
#
#
# PLAYER
#
UPDATE command SET security=0 WHERE name='dismount';
UPDATE command SET security=0 WHERE name='lookup object';
UPDATE command SET security=0 WHERE name='spect spectate';
UPDATE command SET security=0 WHERE name='lookup spell id';
UPDATE command SET security=0 WHERE name='lookup quest';
UPDATE command SET security=0 WHERE name='lookup skill';
UPDATE command SET security=0 WHERE name='spect version';
UPDATE command SET security=0 WHERE name='spect watch';
UPDATE command SET security=0 WHERE name='lookup spell';
UPDATE command SET security=0 WHERE name='lookup map';
UPDATE command SET security=0 WHERE name='commands';
UPDATE command SET security=0 WHERE name='lookup itemset';
UPDATE command SET security=0 WHERE name='lookup title';
UPDATE command SET security=0 WHERE name='lookup area';
UPDATE command SET security=0 WHERE name='lookup creature';
UPDATE command SET security=0 WHERE name='lookup event';
UPDATE command SET security=0 WHERE name='spect';
UPDATE command SET security=0 WHERE name='spect leave';
UPDATE command SET security=0 WHERE name='lookup faction';
UPDATE command SET security=0 WHERE name='lookup item';
UPDATE command SET security=0 WHERE name='lookup taxinode';
UPDATE command SET security=0 WHERE name='spect reset';
UPDATE command SET security=0 WHERE name='account lock';
UPDATE command SET security=0 WHERE name='server motd';
UPDATE command SET security=0 WHERE name='gm ingame';
UPDATE command SET security=0 WHERE name='account';
UPDATE command SET security=0 WHERE name='account password';
UPDATE command SET security=0 WHERE name='debug hostil';
UPDATE command SET security=0 WHERE name='help';
UPDATE command SET security=0 WHERE name='qc';
UPDATE command SET security=0 WHERE name='azth xp';
UPDATE command SET security=0 WHERE name='azth maxskill';
UPDATE command SET security=0 WHERE name='lookup';
#
# GM T1
#
UPDATE command SET security=1 WHERE name='quest remove';
UPDATE command SET security=1 WHERE name='quest add';
UPDATE command SET security=1 WHERE name='reload command';
UPDATE command SET security=1 WHERE name='quest';
UPDATE command SET security=1 WHERE name='quest complete';
UPDATE command SET security=1 WHERE name='pinfo';
UPDATE command SET security=1 WHERE name='npc add';
UPDATE command SET security=1 WHERE name='npc add formation';
UPDATE command SET security=1 WHERE name='npc add item';
UPDATE command SET security=1 WHERE name='npc add move';
UPDATE command SET security=1 WHERE name='npc delete item';
UPDATE command SET security=1 WHERE name='repairitems';
UPDATE command SET security=1 WHERE name='recall';
UPDATE command SET security=1 WHERE name='reset achievements';
UPDATE command SET security=1 WHERE name='reset honor';
UPDATE command SET security=1 WHERE name='reload npc_vendor';
UPDATE command SET security=1 WHERE name='reset level';
UPDATE command SET security=1 WHERE name='reset spells';
UPDATE command SET security=1 WHERE name='wp modify';
UPDATE command SET security=1 WHERE name='reset stats';
UPDATE command SET security=1 WHERE name='reset talents';
UPDATE command SET security=1 WHERE name='reset';
UPDATE command SET security=1 WHERE name='respawn';
UPDATE command SET security=1 WHERE name='npc delete';
UPDATE command SET security=1 WHERE name='npc set level';
UPDATE command SET security=1 WHERE name='nameannounce';
UPDATE command SET security=1 WHERE name='mute';
UPDATE command SET security=1 WHERE name='movegens';
UPDATE command SET security=1 WHERE name='modify';
UPDATE command SET security=1 WHERE name='modify speed all';
UPDATE command SET security=1 WHERE name='character titles';
UPDATE command SET security=1 WHERE name='modify speed backwalk';
UPDATE command SET security=1 WHERE name='modify speed';
UPDATE command SET security=1 WHERE name='modify reputation';
UPDATE command SET security=1 WHERE name='modify phase';
UPDATE command SET security=1 WHERE name='modify money';
UPDATE command SET security=1 WHERE name='appear';
UPDATE command SET security=1 WHERE name='neargrave';
UPDATE command SET security=1 WHERE name='notify';
UPDATE command SET security=1 WHERE name='npc set factionid';
UPDATE command SET security=1 WHERE name='npc set flag';
UPDATE command SET security=1 WHERE name='npc follow';
UPDATE command SET security=1 WHERE name='npc info';
UPDATE command SET security=1 WHERE name='npc follow stop';
UPDATE command SET security=1 WHERE name='npc move';
UPDATE command SET security=1 WHERE name='wpgps';
UPDATE command SET security=1 WHERE name='npc set link';
UPDATE command SET security=1 WHERE name='npc set model';
UPDATE command SET security=1 WHERE name='npc set movetype';
UPDATE command SET security=1 WHERE name='npc set phase';
UPDATE command SET security=1 WHERE name='modify mana';
UPDATE command SET security=1 WHERE name='ticket complete';
UPDATE command SET security=1 WHERE name='morph';
UPDATE command SET security=1 WHERE name='group remove';
UPDATE command SET security=1 WHERE name='group disband';
UPDATE command SET security=1 WHERE name='group leader';
UPDATE command SET security=1 WHERE name='dev';
UPDATE command SET security=1 WHERE name='titles';
UPDATE command SET security=1 WHERE name='wp add';
UPDATE command SET security=1 WHERE name='npc add temp';
UPDATE command SET security=1 WHERE name='npc set spawntime';
UPDATE command SET security=1 WHERE name='npc set spawndist';
UPDATE command SET security=1 WHERE name='learn all recipes';
UPDATE command SET security=1 WHERE name='achievement';
UPDATE command SET security=1 WHERE name='achievement add';
UPDATE command SET security=1 WHERE name='character changerace';
UPDATE command SET security=1 WHERE name='modify arenapoints';
UPDATE command SET security=1 WHERE name='quest reward';
UPDATE command SET security=1 WHERE name='group join';
UPDATE command SET security=1 WHERE name='npc set';
UPDATE command SET security=1 WHERE name='gobject set state';
UPDATE command SET security=1 WHERE name='gobject set';
UPDATE command SET security=1 WHERE name='debug play';
UPDATE command SET security=1 WHERE name='mailbox';
UPDATE command SET security=1 WHERE name='account addon';
UPDATE command SET security=1 WHERE name='instance getbossstate';
UPDATE command SET security=1 WHERE name='instance setbossstate';
UPDATE command SET security=1 WHERE name='lookup player';
UPDATE command SET security=1 WHERE name='achievement checkall';
UPDATE command SET security=1 WHERE name='learn all my';
UPDATE command SET security=1 WHERE name='learn all';
UPDATE command SET security=1 WHERE name='skirmish';
UPDATE command SET security=1 WHERE name='group list';
UPDATE command SET security=1 WHERE name='character changefaction';
UPDATE command SET security=1 WHERE name='titles add';
UPDATE command SET security=1 WHERE name='ticket onlinelist';
UPDATE command SET security=1 WHERE name='ticket list';
UPDATE command SET security=1 WHERE name='ticket comment';
UPDATE command SET security=1 WHERE name='ticket closedlist';
UPDATE command SET security=1 WHERE name='ticket close';
UPDATE command SET security=1 WHERE name='ticket assign';
UPDATE command SET security=1 WHERE name='tele';
UPDATE command SET security=1 WHERE name='tele name';
UPDATE command SET security=1 WHERE name='tele group';
UPDATE command SET security=1 WHERE name='tele add';
UPDATE command SET security=1 WHERE name='setskill';
UPDATE command SET security=1 WHERE name='server info';
UPDATE command SET security=1 WHERE name='send mail';
UPDATE command SET security=1 WHERE name='send items';
UPDATE command SET security=1 WHERE name='ticket unassign';
UPDATE command SET security=1 WHERE name='ticket viewid';
UPDATE command SET security=1 WHERE name='ticket viewname';
UPDATE command SET security=1 WHERE name='titles current';
UPDATE command SET security=1 WHERE name='titles remove';
UPDATE command SET security=1 WHERE name='wp unload';
UPDATE command SET security=1 WHERE name='wp show';
UPDATE command SET security=1 WHERE name='wp load';
UPDATE command SET security=1 WHERE name='wp event';
UPDATE command SET security=1 WHERE name='whispers';
UPDATE command SET security=1 WHERE name='unpossess';
UPDATE command SET security=1 WHERE name='unmute';
UPDATE command SET security=1 WHERE name='unlearn';
UPDATE command SET security=1 WHERE name='unfreeze';
UPDATE command SET security=1 WHERE name='unbindsight';
UPDATE command SET security=1 WHERE name='unaura';
UPDATE command SET security=1 WHERE name='ticket';
UPDATE command SET security=1 WHERE name='revive';
UPDATE command SET security=1 WHERE name='modify hp';
UPDATE command SET security=1 WHERE name='announce';
UPDATE command SET security=1 WHERE name='character reputation';
UPDATE command SET security=1 WHERE name='combatstop';
UPDATE command SET security=1 WHERE name='cometome';
UPDATE command SET security=1 WHERE name='cooldown';
UPDATE command SET security=1 WHERE name='damage';
UPDATE command SET security=1 WHERE name='honor add kill';
UPDATE command SET security=1 WHERE name='honor add';
UPDATE command SET security=1 WHERE name='guild';
UPDATE command SET security=1 WHERE name='guild rank';
UPDATE command SET security=1 WHERE name='guid';
UPDATE command SET security=1 WHERE name='groupsummon';
UPDATE command SET security=1 WHERE name='gps';
UPDATE command SET security=1 WHERE name='character rename';
UPDATE command SET security=1 WHERE name='character customize';
UPDATE command SET security=1 WHERE name='honor update';
UPDATE command SET security=1 WHERE name='instance listbinds';
UPDATE command SET security=1 WHERE name='baninfo account';
UPDATE command SET security=1 WHERE name='baninfo character';
UPDATE command SET security=1 WHERE name='baninfo ip';
UPDATE command SET security=1 WHERE name='baninfo';
UPDATE command SET security=1 WHERE name='bank';
UPDATE command SET security=1 WHERE name='banlist account';
UPDATE command SET security=1 WHERE name='banlist character';
UPDATE command SET security=1 WHERE name='banlist ip';
UPDATE command SET security=1 WHERE name='banlist';
UPDATE command SET security=1 WHERE name='honor';
UPDATE command SET security=1 WHERE name='gm';
UPDATE command SET security=1 WHERE name='demorph';
UPDATE command SET security=1 WHERE name='die';
UPDATE command SET security=1 WHERE name='go trigger';
UPDATE command SET security=1 WHERE name='go ticket';
UPDATE command SET security=1 WHERE name='go taxinode';
UPDATE command SET security=1 WHERE name='go object';
UPDATE command SET security=1 WHERE name='gm chat';
UPDATE command SET security=1 WHERE name='gm fly';
UPDATE command SET security=1 WHERE name='gm visible';
UPDATE command SET security=1 WHERE name='go grid';
UPDATE command SET security=1 WHERE name='go graveyard';
UPDATE command SET security=1 WHERE name='go creature';
UPDATE command SET security=1 WHERE name='gmnotify';
UPDATE command SET security=1 WHERE name='gmnameannounce';
UPDATE command SET security=1 WHERE name='go xyz';
UPDATE command SET security=1 WHERE name='go zonexy';
UPDATE command SET security=1 WHERE name='go';
UPDATE command SET security=1 WHERE name='distance';
UPDATE command SET security=1 WHERE name='summon';
UPDATE command SET security=1 WHERE name='gobject';
UPDATE command SET security=1 WHERE name='gobject turn';
UPDATE command SET security=1 WHERE name='gobject set phase';
UPDATE command SET security=1 WHERE name='gobject target';
UPDATE command SET security=1 WHERE name='gobject add temp';
UPDATE command SET security=1 WHERE name='gobject move';
UPDATE command SET security=1 WHERE name='gobject delete';
UPDATE command SET security=1 WHERE name='gobject add';
UPDATE command SET security=1 WHERE name='gobject activate';
UPDATE command SET security=1 WHERE name='freeze';
UPDATE command SET security=1 WHERE name='gmannounce';
UPDATE command SET security=1 WHERE name='learn all crafts';
UPDATE command SET security=1 WHERE name='lookup player account';
UPDATE command SET security=1 WHERE name='additem';
UPDATE command SET security=1 WHERE name='list';
UPDATE command SET security=1 WHERE name='instance';
UPDATE command SET security=1 WHERE name='list object';
UPDATE command SET security=1 WHERE name='list item';
UPDATE command SET security=1 WHERE name='learn all my class';
UPDATE command SET security=1 WHERE name='kick';
UPDATE command SET security=1 WHERE name='list creature';
UPDATE command SET security=1 WHERE name='learn all my pettalents';
UPDATE command SET security=1 WHERE name='learn all my spells';
UPDATE command SET security=1 WHERE name='additemset';
UPDATE command SET security=1 WHERE name='learn';
UPDATE command SET security=1 WHERE name='list auras';
UPDATE command SET security=1 WHERE name='learn all my talents';
UPDATE command SET security=1 WHERE name='modify scale';
UPDATE command SET security=1 WHERE name='gobject near';
UPDATE command SET security=1 WHERE name='lookup player email';
UPDATE command SET security=1 WHERE name='lookup player ip';
UPDATE command SET security=1 WHERE name='modify honor';
UPDATE command SET security=1 WHERE name='instance stats';
UPDATE command SET security=1 WHERE name='modify gender';
UPDATE command SET security=1 WHERE name='learn all gm';
UPDATE command SET security=1 WHERE name='modify speed fly';
UPDATE command SET security=1 WHERE name='maxskill';
UPDATE command SET security=1 WHERE name='learn all lang';
UPDATE command SET security=1 WHERE name='learn all default';
UPDATE command SET security=1 WHERE name='modify drunk';
UPDATE command SET security=1 WHERE name='levelup';
UPDATE command SET security=1 WHERE name='instance unbind';
UPDATE command SET security=1 WHERE name='lookup tele';
UPDATE command SET security=1 WHERE name='modify speed swim';
UPDATE command SET security=1 WHERE name='modify speed walk';
#
# ENTERTAINER / STORY TELLER
#
UPDATE command SET security=2 WHERE name='guild create';
UPDATE command SET security=2 WHERE name='ticket response append';
UPDATE command SET security=2 WHERE name='debug play movie';
UPDATE command SET security=2 WHERE name='npc whisper';
UPDATE command SET security=2 WHERE name='npc yell';
UPDATE command SET security=2 WHERE name='titles set mask';
UPDATE command SET security=2 WHERE name='guild delete';
UPDATE command SET security=2 WHERE name='guild uninvite';
UPDATE command SET security=2 WHERE name='npc textemote';
UPDATE command SET security=2 WHERE name='debug play sound';
UPDATE command SET security=2 WHERE name='unstuck';
UPDATE command SET security=2 WHERE name='event';
UPDATE command SET security=2 WHERE name='modify bit';
UPDATE command SET security=2 WHERE name='modify standstate';
UPDATE command SET security=2 WHERE name='titles set';
UPDATE command SET security=2 WHERE name='modify energy';
UPDATE command SET security=2 WHERE name='modify rage';
UPDATE command SET security=2 WHERE name='modify mount';
UPDATE command SET security=2 WHERE name='gobject info';
UPDATE command SET security=2 WHERE name='modify runicpower';
UPDATE command SET security=2 WHERE name='server corpses';
UPDATE command SET security=2 WHERE name='debug';
UPDATE command SET security=2 WHERE name='ticket response appendln';
UPDATE command SET security=2 WHERE name='npc playemote';
UPDATE command SET security=2 WHERE name='npc say';
UPDATE command SET security=2 WHERE name='event activelist';
UPDATE command SET security=2 WHERE name='event start';
UPDATE command SET security=2 WHERE name='event stop';
UPDATE command SET security=2 WHERE name='wchange';
UPDATE command SET security=2 WHERE name='pet create';
UPDATE command SET security=2 WHERE name='itemmove';
UPDATE command SET security=2 WHERE name='account set addon';
UPDATE command SET security=2 WHERE name='npc';
UPDATE command SET security=2 WHERE name='pet unlearn';
UPDATE command SET security=2 WHERE name='npc evade';
UPDATE command SET security=2 WHERE name='playall';
UPDATE command SET security=2 WHERE name='ticket escalatedlist';
UPDATE command SET security=2 WHERE name='ticket escalate';
UPDATE command SET security=2 WHERE name='character';
UPDATE command SET security=2 WHERE name='ticket response';
UPDATE command SET security=2 WHERE name='npc tame';
UPDATE command SET security=2 WHERE name='npc near';
UPDATE command SET security=2 WHERE name='send';
UPDATE command SET security=2 WHERE name='debug play cinematic';
UPDATE command SET security=2 WHERE name='reload creature_linked_respawn';
UPDATE command SET security=2 WHERE name='pet';
UPDATE command SET security=2 WHERE name='account set';
#
# GM T2 PROTECTOR
#
UPDATE command SET security=3 WHERE name='reload locales_creature_text';
UPDATE command SET security=3 WHERE name='unban playeraccount';
UPDATE command SET security=3 WHERE name='reload creature_template';
UPDATE command SET security=3 WHERE name='ban';
UPDATE command SET security=3 WHERE name='reload gameobject_questender';
UPDATE command SET security=3 WHERE name='cast back';
UPDATE command SET security=3 WHERE name='ticket togglesystem';
UPDATE command SET security=3 WHERE name='debug entervehicle';
UPDATE command SET security=3 WHERE name='debug getitemvalue';
UPDATE command SET security=3 WHERE name='ban account';
UPDATE command SET security=3 WHERE name='debug threat';
UPDATE command SET security=3 WHERE name='debug setitemvalue';
UPDATE command SET security=3 WHERE name='wp';
UPDATE command SET security=3 WHERE name='debug send chatmessage';
UPDATE command SET security=3 WHERE name='gm list';
UPDATE command SET security=3 WHERE name='ban character';
UPDATE command SET security=3 WHERE name='debug los';
UPDATE command SET security=3 WHERE name='debug lootrecipient';
UPDATE command SET security=3 WHERE name='debug itemexpire';
UPDATE command SET security=3 WHERE name='ban ip';
UPDATE command SET security=3 WHERE name='debug getvalue';
UPDATE command SET security=3 WHERE name='debug uws';
UPDATE command SET security=3 WHERE name='debug getitemstate';
UPDATE command SET security=3 WHERE name='reload conditions';
UPDATE command SET security=3 WHERE name='reload creature_onkill_reputation';
UPDATE command SET security=3 WHERE name='reload locales_item_set_name';
UPDATE command SET security=3 WHERE name='cast';
UPDATE command SET security=3 WHERE name='character level';
UPDATE command SET security=3 WHERE name='debug moveflags';
UPDATE command SET security=3 WHERE name='group';
UPDATE command SET security=3 WHERE name='reload waypoint_data';
UPDATE command SET security=3 WHERE name='reload vehicle_template_accessory';
UPDATE command SET security=3 WHERE name='reload vehicle_accessory';
UPDATE command SET security=3 WHERE name='reload smart_scripts';
UPDATE command SET security=3 WHERE name='reload all spell';
UPDATE command SET security=3 WHERE name='reload mail_level_reward';
UPDATE command SET security=3 WHERE name='reload auctions';
UPDATE command SET security=3 WHERE name='reload achievement_criteria_data';
UPDATE command SET security=3 WHERE name='reload achievement_reward';
UPDATE command SET security=3 WHERE name='reload all achievement';
UPDATE command SET security=3 WHERE name='cast target';
UPDATE command SET security=3 WHERE name='cast self';
UPDATE command SET security=3 WHERE name='reload access_requirement';
UPDATE command SET security=3 WHERE name='reload gossip_menu';
UPDATE command SET security=3 WHERE name='reload gossip_menu_option';
UPDATE command SET security=3 WHERE name='cast dest';
UPDATE command SET security=3 WHERE name='reload all scripts';
UPDATE command SET security=3 WHERE name='reload locales_gossip_menu_option';
UPDATE command SET security=3 WHERE name='reload quest_poi';
UPDATE command SET security=3 WHERE name='reload lfg_dungeon_rewards';
UPDATE command SET security=3 WHERE name='reload npc_spellclick_spells';
UPDATE command SET security=3 WHERE name='bindsight';
UPDATE command SET security=3 WHERE name='ban playeraccount';
UPDATE command SET security=3 WHERE name='cast dist';
UPDATE command SET security=3 WHERE name='reload page_text';
UPDATE command SET security=3 WHERE name='reload creature_text';
UPDATE command SET security=3 WHERE name='debug setvalue';
UPDATE command SET security=3 WHERE name='reload all area';
UPDATE command SET security=3 WHERE name='reload spell_scripts';
UPDATE command SET security=3 WHERE name='reload skill_fishing_base_level';
UPDATE command SET security=3 WHERE name='reload skill_discovery_template';
UPDATE command SET security=3 WHERE name='reload autobroadcast';
UPDATE command SET security=3 WHERE name='reload config';
UPDATE command SET security=3 WHERE name='reload creature_questender';
UPDATE command SET security=3 WHERE name='reload creature_loot_template';
UPDATE command SET security=3 WHERE name='reload creature_queststarter';
UPDATE command SET security=3 WHERE name='reload disenchant_loot_template';
UPDATE command SET security=3 WHERE name='reload reserved_name';
UPDATE command SET security=3 WHERE name='reload skinning_loot_template';
UPDATE command SET security=3 WHERE name='reload spell_area';
UPDATE command SET security=3 WHERE name='reload spell_bonus_data';
UPDATE command SET security=3 WHERE name='reload item_set_names';
UPDATE command SET security=3 WHERE name='reload spell_required';
UPDATE command SET security=3 WHERE name='reload spell_proc_event';
UPDATE command SET security=3 WHERE name='reload spell_pet_auras';
UPDATE command SET security=3 WHERE name='reload spell_loot_template';
UPDATE command SET security=3 WHERE name='reload areatrigger_teleport';
UPDATE command SET security=3 WHERE name='reload spell_linked_spell';
UPDATE command SET security=3 WHERE name='reload spell_group_stack_rules';
UPDATE command SET security=3 WHERE name='reload disables';
UPDATE command SET security=3 WHERE name='reload event_scripts';
UPDATE command SET security=3 WHERE name='reload fishing_loot_template';
UPDATE command SET security=3 WHERE name='reload pickpocketing_loot_template';
UPDATE command SET security=3 WHERE name='modify talentpoints';
UPDATE command SET security=3 WHERE name='reload locales_item';
UPDATE command SET security=3 WHERE name='reload locales_gameobject';
UPDATE command SET security=3 WHERE name='reload npc_trainer';
UPDATE command SET security=3 WHERE name='reload milling_loot_template';
UPDATE command SET security=3 WHERE name='reload locales_quest';
UPDATE command SET security=3 WHERE name='reload locales_points_of_interest';
UPDATE command SET security=3 WHERE name='reload locales_page_text';
UPDATE command SET security=3 WHERE name='reload points_of_interest';
UPDATE command SET security=3 WHERE name='reload prospecting_loot_template';
UPDATE command SET security=3 WHERE name='reload mail_loot_template';
UPDATE command SET security=3 WHERE name='reload game_graveyard_zone';
UPDATE command SET security=3 WHERE name='reload game_tele';
UPDATE command SET security=3 WHERE name='reload gameobject_loot_template';
UPDATE command SET security=3 WHERE name='reload gameobject_queststarter';
UPDATE command SET security=3 WHERE name='reload gm_tickets';
UPDATE command SET security=3 WHERE name='reload item_enchantment_template';
UPDATE command SET security=3 WHERE name='reload reference_loot_template';
UPDATE command SET security=3 WHERE name='reload quest_template';
UPDATE command SET security=3 WHERE name='reload item_loot_template';
UPDATE command SET security=3 WHERE name='reload locales_npc_text';
UPDATE command SET security=3 WHERE name='reload areatrigger_tavern';
UPDATE command SET security=3 WHERE name='unban';
UPDATE command SET security=3 WHERE name='reload spell_proc';
UPDATE command SET security=3 WHERE name='reload spell_group';
UPDATE command SET security=3 WHERE name='hidearea';
UPDATE command SET security=3 WHERE name='wp reload';
UPDATE command SET security=3 WHERE name='server restart cancel';
UPDATE command SET security=3 WHERE name='server restart';
UPDATE command SET security=3 WHERE name='server shutdown cancel';
UPDATE command SET security=3 WHERE name='server shutdown';
UPDATE command SET security=3 WHERE name='server';
UPDATE command SET security=3 WHERE name='showarea';
UPDATE command SET security=3 WHERE name='tele del';
UPDATE command SET security=3 WHERE name='reload locales_creature';
UPDATE command SET security=3 WHERE name='ticket delete';
UPDATE command SET security=3 WHERE name='unban account';
UPDATE command SET security=3 WHERE name='unban character';
UPDATE command SET security=3 WHERE name='unban ip';
UPDATE command SET security=3 WHERE name='server idleshutdown cancel';
UPDATE command SET security=3 WHERE name='instance savedata';
UPDATE command SET security=3 WHERE name='reload skill_extra_item_template';
UPDATE command SET security=3 WHERE name='send message';
UPDATE command SET security=3 WHERE name='reload';
UPDATE command SET security=3 WHERE name='guild invite';
UPDATE command SET security=3 WHERE name='reload trinity_string';
UPDATE command SET security=3 WHERE name='reload spell_threats';
UPDATE command SET security=3 WHERE name='reload spell_target_position';
UPDATE command SET security=3 WHERE name='reload areatrigger_involvedrelation';
UPDATE command SET security=3 WHERE name='server idlerestart cancel';
UPDATE command SET security=3 WHERE name='reload waypoint_scripts';
#
# SERVER OP ( ADMIN )
#
UPDATE command SET security=4 WHERE name='modify faction';
UPDATE command SET security=4 WHERE name='account set gmlevel';
UPDATE command SET security=4 WHERE name='pdump load';
UPDATE command SET security=4 WHERE name='account onlinelist';
UPDATE command SET security=4 WHERE name='account delete';
UPDATE command SET security=4 WHERE name='debug setbit';
UPDATE command SET security=4 WHERE name='reload all';
UPDATE command SET security=4 WHERE name='possess';
UPDATE command SET security=4 WHERE name='reload all gossips';
UPDATE command SET security=4 WHERE name='reload all item';
UPDATE command SET security=4 WHERE name='reload all quest';
UPDATE command SET security=4 WHERE name='pet learn';
UPDATE command SET security=4 WHERE name='pdump';
UPDATE command SET security=4 WHERE name='pdump write';
UPDATE command SET security=4 WHERE name='npc set entry';
UPDATE command SET security=4 WHERE name='reload all npc';
UPDATE command SET security=4 WHERE name='linkgrave';
UPDATE command SET security=4 WHERE name='reload all locales';
UPDATE command SET security=4 WHERE name='aura';
UPDATE command SET security=4 WHERE name='reload all loot';
UPDATE command SET security=4 WHERE name='npc set allowmove';
UPDATE command SET security=4 WHERE name='modify spell';
UPDATE command SET security=4 WHERE name='account set password';
UPDATE command SET security=4 WHERE name='account create';
UPDATE command SET security=4 WHERE name='flusharenapoints';
UPDATE command SET security=4 WHERE name='server idlerestart';
UPDATE command SET security=4 WHERE name='server exit';
UPDATE command SET security=4 WHERE name='send money';
UPDATE command SET security=4 WHERE name='saveall';
UPDATE command SET security=4 WHERE name='save';
UPDATE command SET security=4 WHERE name='debug send sellerror';
UPDATE command SET security=4 WHERE name='server set loglevel';
UPDATE command SET security=4 WHERE name='reset all';
UPDATE command SET security=4 WHERE name='debug Mod32Value';
UPDATE command SET security=4 WHERE name='debug areatriggers';
UPDATE command SET security=4 WHERE name='server idleshutdown';
UPDATE command SET security=4 WHERE name='debug send chatmmessage';
UPDATE command SET security=4 WHERE name='debug send spellfail';
UPDATE command SET security=4 WHERE name='server set motd';
UPDATE command SET security=4 WHERE name='server set closed';
UPDATE command SET security=4 WHERE name='debug send setphaseshift';
UPDATE command SET security=4 WHERE name='debug send qinvalidmsg';
UPDATE command SET security=4 WHERE name='debug send qpartymsg';
UPDATE command SET security=4 WHERE name='debug send opcode';
UPDATE command SET security=4 WHERE name='debug send largepacket';
UPDATE command SET security=4 WHERE name='debug send equiperror';
UPDATE command SET security=4 WHERE name='debug bg';
UPDATE command SET security=4 WHERE name='debug arena';
UPDATE command SET security=4 WHERE name='ticket reset';
UPDATE command SET security=4 WHERE name='debug send channelnotify';
UPDATE command SET security=4 WHERE name='debug send buyerror';
UPDATE command SET security=4 WHERE name='debug send';
UPDATE command SET security=4 WHERE name='server togglequerylog';
UPDATE command SET security=4 WHERE name='debug setaurastate';
UPDATE command SET security=4 WHERE name='debug spawnvehicle';
UPDATE command SET security=4 WHERE name='debug setvid';
UPDATE command SET security=4 WHERE name='debug update';
UPDATE command SET security=4 WHERE name='bf';
UPDATE command SET security=4 WHERE name='lfg options';
UPDATE command SET security=4 WHERE name='lfg clean';
UPDATE command SET security=4 WHERE name='lfg queue';
UPDATE command SET security=4 WHERE name='npc set data';
UPDATE command SET security=4 WHERE name='bf start';
UPDATE command SET security=4 WHERE name='bf stop';
UPDATE command SET security=4 WHERE name='bf enable';
UPDATE command SET security=4 WHERE name='bf switch';
UPDATE command SET security=4 WHERE name='bf timer';
UPDATE command SET security=4 WHERE name='lfg player';
UPDATE command SET security=4 WHERE name='lfg group';
UPDATE command SET security=4 WHERE name='lfg';
UPDATE command SET security=5 WHERE name='debug anim';

View File

@@ -0,0 +1 @@
REPLACE INTO `creature_template` VALUES (300207, 0, 0, 0, 0, 0, 24934, 0, 0, 0, 'TimeWalking', NULL, NULL, 0, 82, 82, 0, 35, 129, 1.2, 1.5, 0.1, 2, 1700, 2700, 0, 100, 1, 1000, 2000, 1, 512, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1, 25, 1, 1, 0, 0, 1, 0, 0, 'TimeWalkingGossip', 12341);

View File

@@ -0,0 +1,4 @@
DELETE FROM trinity_string WHERE entry IN (7000, 7001);
INSERT INTO trinity_string (entry, content_default) VALUES (7000, "|cffff0000[Arena Queue Announcer]:|r A team joined %ux%u! |r");
INSERT INTO trinity_string (entry, content_default) VALUES (7001, "|cffff0000[Arena Queue Announcer]:|r A team exited %ux%u! |r");

View File

@@ -0,0 +1,7 @@
REPLACE INTO `npc_text` VALUES (50100, 'Ciao $N! Scegli che tipo di avventura vuoi vivere.', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
REPLACE INTO `npc_text` VALUES (50101, 'Questi sono i raid e dungeon che attualmente danno maggiori ricompense, approfittane!', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
REPLACE INTO `npc_text` VALUES (50102, 'Scegli l\'espansione che vuoi rigiocare.', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
REPLACE INTO `npc_text` VALUES (50103, 'Scegli ora quale fase giocare.', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
REPLACE INTO `npc_text` VALUES (50104, 'E ora la scelta finale!', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
REPLACE INTO `npc_text` VALUES (50105, 'Sei gia in modalita TimeWalking', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);
REPLACE INTO `npc_text` VALUES (50106, 'Non puoi usare questo NPC mentre stai usando il Looking For Group!', NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1);

View File

@@ -0,0 +1,25 @@
-- --------------------------------------------------------
-- Host: server.wownewage.com
-- Versione server: 5.7.16-0ubuntu0.16.04.1 - (Ubuntu)
-- S.O. server: Linux
-- HeidiSQL Versione: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dump della struttura di tabella world.season
CREATE TABLE IF NOT EXISTS `season` (
`itemLevel` int(11) NOT NULL,
`startingFrom` int(11) NOT NULL,
`endOn` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dump dei dati della tabella world.season: ~1 rows (circa)
/*!40000 ALTER TABLE `season` DISABLE KEYS */;
/*!40000 ALTER TABLE `season` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View File

@@ -0,0 +1,131 @@
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','53','1','0','0','4');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','921','1','0','0','4');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1757','1','0','0','6');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1776','1','0','0','6');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1784','1','0','0','1');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','408','1','0','0','30');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','674','1','0','0','10');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','703','1','0','0','14');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1725','1','0','0','22');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1758','1','0','0','14');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1759','1','0','0','22');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1760','1','0','0','30');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1766','1','0','0','12');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1785','1','0','0','20');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1786','1','0','0','40');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1787','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1804','1','0','0','16');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1833','1','0','0','26');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1842','1','0','0','30');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1856','1','0','0','22');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1857','1','0','0','42');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1860','1','0','0','40');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1943','1','0','0','20');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','1966','1','0','0','16');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2070','1','0','0','28');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2094','1','0','0','34');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2589','1','0','0','12');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2590','1','0','0','20');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2591','1','0','0','28');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2836','1','0','0','24');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','2983','1','0','0','10');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','3127','1','0','0','12');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','5171','1','0','0','10');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','5277','1','0','0','8');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','5938','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','6760','1','0','0','8');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','6761','1','0','0','16');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','6762','1','0','0','24');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','6768','1','0','0','28');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','6770','1','0','0','10');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','6774','1','0','0','42');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8621','1','0','0','38');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8623','1','0','0','32');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8624','1','0','0','40');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8631','1','0','0','22');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8632','1','0','0','30');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8633','1','0','0','38');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8637','1','0','0','40');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8639','1','0','0','28');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8640','1','0','0','36');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8643','1','0','0','50');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8647','1','0','0','14');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8649','1','0','0','26');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8650','1','0','0','36');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8676','1','0','0','18');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8696','1','0','0','34');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8721','1','0','0','36');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8724','1','0','0','26');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','8725','1','0','0','34');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11197','1','0','0','46');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11198','1','0','0','56');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11267','1','0','0','42');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11268','1','0','0','50');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11269','1','0','0','58');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11273','1','0','0','44');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11274','1','0','0','52');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11275','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11279','1','0','0','44');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11280','1','0','0','52');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11281','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11289','1','0','0','46');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11290','1','0','0','54');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11293','1','0','0','46');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11294','1','0','0','54');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11297','1','0','0','48');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11299','1','0','0','48');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11300','1','0','0','56');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11303','1','0','0','52');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','11305','1','0','0','58');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','17347','1','0','0','46');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','17348','1','0','0','58');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','25300','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','25302','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26669','1','0','0','50');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26679','1','0','0','64');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26839','1','0','0','61');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26861','1','0','0','62');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26862','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26863','1','0','0','68');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26864','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26865','1','0','0','64');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26866','1','0','0','66');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26867','1','0','0','68');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26884','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','26889','1','0','0','62');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','27441','1','0','0','66');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','27448','1','0','0','64');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','31016','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','31224','1','0','0','66');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','32645','1','0','0','62');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','32684','1','0','0','69');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','34411','1','0','0','50');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','34412','1','0','0','60');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','34413','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48637','1','0','0','76');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48638','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48656','1','0','0','74');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48657','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48658','1','0','0','72');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48659','1','0','0','78');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48660','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48663','1','0','0','75');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48666','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48667','1','0','0','73');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48668','1','0','0','79');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48669','1','0','0','77');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48671','1','0','0','74');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48672','1','0','0','79');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48673','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48674','1','0','0','76');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48675','1','0','0','75');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48676','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48689','1','0','0','70');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48690','1','0','0','75');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','48691','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','51722','1','0','0','20');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','51723','1','0','0','80');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','51724','1','0','0','71');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','57934','1','0','0','75');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','57992','1','0','0','74');
replace into `npc_trainer` (`ID`, `SpellID`, `MoneyCost`, `ReqSkillLine`, `ReqSkillRank`, `ReqLevel`) values('760005','57993','1','0','0','80');

View File

@@ -0,0 +1,14 @@
DELETE FROM creature_template WHERE entry >= 760000 AND entry <= 760009;
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760000','0','0','0','0','0','24029','0','0','0','Druid PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','234','331','0','286','1','2000','2000','2','768','2048','0','0','0','0','11','0','198','295','33','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760001','0','0','0','0','0','24030','0','0','0','Hunter PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','234','331','0','286','1','2000','2000','2','768','2048','0','0','0','0','3','0','198','295','33','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760002','0','0','0','0','0','24031','0','0','0','Mage PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','248','363','0','135','1','2000','2000','8','768','2048','0','0','0','0','8','0','233','347','28','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760003','0','0','0','0','0','24032','0','0','0','Paladin PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','234','331','0','286','1','2000','2000','2','768','2048','0','0','0','0','2','0','198','295','33','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760004','0','0','0','0','0','24033','0','0','0','Priest PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','248','363','0','135','1','2000','2000','8','768','2048','0','0','0','0','5','0','233','347','28','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760005','0','0','0','0','0','23777','0','0','0','Rogue PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','252','357','0','304','1','2000','2000','1','768','2048','0','0','0','0','4','0','215','320','44','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760006','0','0','0','0','0','24034','0','0','0','Shaman PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','234','331','0','286','1','2000','2000','2','768','2048','0','0','0','0','7','0','198','295','33','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760007','0','0','0','0','0','24035','0','0','0','Warlock PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','248','363','0','135','1','2000','2000','8','768','2048','0','0','0','0','9','0','233','347','28','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760008','0','0','0','0','0','24036','0','0','0','Warrior PVP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','252','357','0','304','1','2000','2000','1','768','2048','0','0','0','0','1','0','215','320','44','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES('760009','0','0','0','0','0','24036','0','0','0','Death Knight PvP Trainer','','','0','70','70','2','35','49','1.1','1.14286','1','0','252','357','0','304','1','2000','2000','1','768','2048','0','0','0','0','1','0','215','320','44','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','1','1','1','1','1','0','0','1','0','0','npc_azth_vendor','12340');
UPDATE creature_template SET minlevel = 82, maxlevel = 82 WHERE entry >= 760000 AND entry <= 760009;

View File

@@ -0,0 +1,150 @@
UPDATE `item_template` SET `name` = "Smartstone", `Flags` = 64, `ScriptName` = 'azth_smart_stone', stackable = 1, `spellid_1` = 36177, maxcount = 1 WHERE (entry = 32547);
DELETE FROM item_template WHERE entry IN (987890, 987891, 987892, 987893, 987894, 987895);
INSERT INTO item_template (entry, class, subclass, NAME, displayid, quality, description, scriptname, flags, stackable, `spellid_1`, buyprice) VALUES
(987890, 0, 8, "Change Faction!", 1542, 5, "Aggiungi alla smartstone il cambio fazione! (1 carica), ATTENZIONE: COL CAMBIO FAZIONE SI PERDE ARENA RATING. NON È POSSIBILE EFFETTUARLO SE SI HANNO ITEM IN ASTA O IN MAIL", "smart_stone_command", 64, 1, 36177, 1000),
(987891, 0, 8, "Rename!", 7629, 5, "Aggiungi alla smartstone il rename! (1 carica)", "smart_stone_command", 64, 1, 36177, 100000),
(987892, 0, 8, "Change Race!", 472, 5, "Aggiungi alla smartstone il cambio razza! (1 carica)", "smart_stone_command", 64, 1, 36177, 10000),
(987893, 0, 8, "Jukebox!", 41449, 5, "Divertiti con la tua musica! (1 carica)", "smart_stone_command", 64, 1, 36177, 10000),
(987894, 0, 8, "Herbalism Bonus Loot!", 7396, 5, "Aumenta la chance di trovare materiali usando Herbalism! (passivo)", "smart_stone_command", 64, 1, 36177, 10000),
(987895, 0, 8, "Mining Bonus Loot!", 6568, 5, "Aumenta la chance di trovare materiali usando Mining! (passivo)", "smart_stone_command", 64, 1, 36177, 10000);
DELETE FROM creature_template WHERE entry = 170000;
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`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
('170000','0','0','0','0','0','1060','0','0','0','Smartstore','AzerothShard',NULL,'0','82','83','0','31','1','1','1.14286','1','0','13','17','0','42','1','2000','2000','1','512','2048','0','0','0','0','0','0','9','13','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','1','1','1','1','0','0','1','0','2','smartstone_vendor','12340');
UPDATE creature_template SET npcflag = 129 WHERE entry = 170000;
DELETE FROM npc_vendor WHERE entry = 170000;
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES('170000','0','987890','0','0','0');
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES('170000','0','987891','0','0','0');
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES('170000','0','987892','0','0','0');
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES('170000','0','987893','0','0','0');
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES('170000','0','987894','0','0','0');
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES('170000','0','987895','0','0','0');
DELETE FROM playercreateinfo_item WHERE itemid = 32547;
INSERT INTO playercreateinfo_item (race, class, itemid, amount) VALUES
(0,0,32547,1),
(0,1,32547,1),
(0,2,32547,1),
(0,3,32547,1),
(0,4,32547,1),
(0,5,32547,1),
(0,6,32547,1),
(0,7,32547,1),
(0,8,32547,1),
(0,9,32547,1),
(0,11,32547,1),
(1,0,32547,1),
(1,1,32547,1),
(1,2,32547,1),
(1,3,32547,1),
(1,4,32547,1),
(1,5,32547,1),
(1,6,32547,1),
(1,7,32547,1),
(1,8,32547,1),
(1,9,32547,1),
(1,11,32547,1),
(2,0,32547,1),
(2,1,32547,1),
(2,2,32547,1),
(2,3,32547,1),
(2,4,32547,1),
(2,5,32547,1),
(2,6,32547,1),
(2,7,32547,1),
(2,8,32547,1),
(2,9,32547,1),
(2,11,32547,1),
(3,0,32547,1),
(3,1,32547,1),
(3,2,32547,1),
(3,3,32547,1),
(3,4,32547,1),
(3,5,32547,1),
(3,6,32547,1),
(3,7,32547,1),
(3,8,32547,1),
(3,9,32547,1),
(3,11,32547,1),
(4,0,32547,1),
(4,1,32547,1),
(4,2,32547,1),
(4,3,32547,1),
(4,4,32547,1),
(4,5,32547,1),
(4,6,32547,1),
(4,7,32547,1),
(4,8,32547,1),
(4,9,32547,1),
(4,11,32547,1),
(5,0,32547,1),
(5,1,32547,1),
(5,2,32547,1),
(5,3,32547,1),
(5,4,32547,1),
(5,5,32547,1),
(5,6,32547,1),
(5,7,32547,1),
(5,8,32547,1),
(5,9,32547,1),
(5,11,32547,1),
(6,0,32547,1),
(6,1,32547,1),
(6,2,32547,1),
(6,3,32547,1),
(6,4,32547,1),
(6,5,32547,1),
(6,6,32547,1),
(6,7,32547,1),
(6,8,32547,1),
(6,9,32547,1),
(6,11,32547,1),
(7,0,32547,1),
(7,1,32547,1),
(7,2,32547,1),
(7,3,32547,1),
(7,4,32547,1),
(7,5,32547,1),
(7,6,32547,1),
(7,7,32547,1),
(7,8,32547,1),
(7,9,32547,1),
(7,11,32547,1),
(8,0,32547,1),
(8,1,32547,1),
(8,2,32547,1),
(8,3,32547,1),
(8,4,32547,1),
(8,5,32547,1),
(8,6,32547,1),
(8,7,32547,1),
(8,8,32547,1),
(8,9,32547,1),
(8,11,32547,1),
(10,0,32547,1),
(10,1,32547,1),
(10,2,32547,1),
(10,3,32547,1),
(10,4,32547,1),
(10,5,32547,1),
(10,6,32547,1),
(10,7,32547,1),
(10,8,32547,1),
(10,9,32547,1),
(10,11,32547,1),
(11,0,32547,1),
(11,1,32547,1),
(11,2,32547,1),
(11,3,32547,1),
(11,4,32547,1),
(11,5,32547,1),
(11,6,32547,1),
(11,7,32547,1),
(11,8,32547,1),
(11,9,32547,1),
(11,11,32547,1);

View File

@@ -0,0 +1,193 @@
#include "AzthFirstKills.h"
#include "Player.h"
#include "AzthUtils.h"
#include "InstanceScript.h"
#include <stdio.h>
#include <time.h>
#include <ctime>
class InstanceScript;
// Copied from naxxramas.h
enum NxEncouters
{
BOSS_PATCHWERK = 0,
BOSS_GROBBULUS = 1,
BOSS_GLUTH = 2,
BOSS_NOTH = 3,
BOSS_HEIGAN = 4,
BOSS_LOATHEB = 5,
BOSS_ANUB = 6,
BOSS_FAERLINA = 7,
BOSS_MAEXXNA = 8,
BOSS_THADDIUS = 9,
BOSS_RAZUVIOUS = 10,
BOSS_GOTHIK = 11,
BOSS_HORSEMAN = 12,
BOSS_SAPPHIRON = 13,
BOSS_KELTHUZAD = 14,
MAX_ENCOUNTERS,
};
AzthFirstKills* AzthFirstKills::instance()
{
static AzthFirstKills instance;
return &instance;
}
bool AzthFirstKills::canCompleteAchi(Player */* player */, uint32 /* achiId */)
{
return true;
/*
uint32 plLevel=sAZTH->GetAZTHPlayer(player)->isTimeWalking() ? sAZTH->GetAZTHPlayer(player)->GetTimeWalkingLevel() : player->getLevel();
uint32 groupLevel=sAZTH->GetAZTHPlayer(player)->getGroupLevel(false);
uint32 level=sAzthUtils->maxTwLevel(groupLevel, plLevel);
switch (achiId) {
case ACHI_NAXXRAMAS:
{
if (InstanceScript* iscript=player->GetInstanceScript()) {
if (
iscript->GetBossState(BOSS_MAEXXNA) == DONE &&
iscript->GetBossState(BOSS_LOATHEB) == DONE &&
iscript->GetBossState(BOSS_HORSEMAN) == DONE &&
iscript->GetBossState(BOSS_THADDIUS) == DONE
) {
return level == TIMEWALKING_LVL_NAXX;
}
}
return false;
}
case ACHI_OBSIDIAN:
return level == TIMEWALKING_LVL_VAS_LVL13;
case ACHI_MAGIC_SEEKER:
return level == TIMEWALKING_LVL_VAS_LVL13;
case ACHI_DEATH_DEMISE:
case ACHI_CELESTIAL_DEFENDER:
return level == TIMEWALKING_LVL_VAS_LVL4;
case ACHI_GRAND_CRUSADER:
return level == TIMEWALKING_LVL_VAS_LVL4;
}
if (achiId == ACHI_FALL_OF_LK) {
if (player->GetInstanceScript() && player->GetInstanceScript()->GetData(DATA_AZTH_HARD_MODE)) {
return true;
}
return false;
}
return true;
* */
}
void AzthFirstKills::setRealmCompleted(const AchievementEntry* achievement)
{
this->currentFirstKills[achievement->ID] = std::chrono::system_clock::now();
}
bool AzthFirstKills::isRealmCompleted(AchievementEntry const* achievement, bool originalValue) {
if (!achievement) //should never happen
return originalValue;
// if first kill exists in our std::map and has been achieved more than 1 minute ago
// then it has been completed.
std::map<uint32, std::chrono::system_clock::time_point>::iterator itr=this->currentFirstKills.find(achievement->ID);
if (itr!=this->currentFirstKills.end()
&& (std::chrono::system_clock::now() - itr->second) > std::chrono::minutes(1))
return true;
// if the first kill does not exists in our map, it is not completed
return false;
/*
time_t now = time(0);
struct tm * tnow = std::gmtime(&now);
switch(achievement->ID) {
case ACHI_NAXXRAMAS:
if (tnow->tm_mon >= 0) { // January : 1-1
return false;
}
break;
case ACHI_OBSIDIAN:
if (tnow->tm_mon >= 1) {// February
AchievementEntry const* achievement = sAchievementStore.LookupEntry(ACHI_NAXXRAMAS);
if (isRealmCompleted(achievement, false))
return false;
}
break;
case ACHI_MAGIC_SEEKER:
if (tnow->tm_mon >= 2) { // March
AchievementEntry const* achievement = sAchievementStore.LookupEntry(ACHI_OBSIDIAN);
if (isRealmCompleted(achievement, false))
return false;
}
break;
case ACHI_DEATH_DEMISE:
if (tnow->tm_mon >= 3) { // Avril
AchievementEntry const* achievement = sAchievementStore.LookupEntry(ACHI_MAGIC_SEEKER);
if (isRealmCompleted(achievement, false))
return false;
}
break;
case ACHI_CELESTIAL_DEFENDER:
if (tnow->tm_mon >= 4) { // May
AchievementEntry const* achievement = sAchievementStore.LookupEntry(ACHI_DEATH_DEMISE);
if (isRealmCompleted(achievement, false))
return false;
}
break;
case ACHI_GRAND_CRUSADER:
if (tnow->tm_mon >= 7) { // August
AchievementEntry const* achievement = sAchievementStore.LookupEntry(ACHI_CELESTIAL_DEFENDER);
if (isRealmCompleted(achievement, false))
return false;
}
break;
case ACHI_FALL_OF_LK:
if (tnow->tm_mon >= 8) { // September
AchievementEntry const* achievement = sAchievementStore.LookupEntry(ACHI_CELESTIAL_DEFENDER);
if (isRealmCompleted(achievement, false))
return false;
}
break;
}
// we assume that the achievement
// has been completed (not available) at this point
return true;
*/
}
void AzthFirstKills::loadCurrentFirstkills() {
uint32 t= static_cast<uint32>(sAzthUtils->getStartsOfYear());
QueryResult fkAchievements = CharacterDatabase.PQuery("SELECT DISTINCT(achievement) FROM character_achievement WHERE achievement IN (%u,%u,%u,%u,%u,%u,%u) AND date >= %u",
ACHI_NAXXRAMAS,
ACHI_OBSIDIAN,
ACHI_MAGIC_SEEKER,
ACHI_DEATH_DEMISE,
ACHI_CELESTIAL_DEFENDER,
ACHI_GRAND_CRUSADER,
ACHI_FALL_OF_LK,
t
);
if (fkAchievements)
{
do {
Field* fkAchievementsFields = fkAchievements->Fetch();
if (!fkAchievementsFields)
break;
uint32 achievement = fkAchievementsFields[0].GetUInt32();
// initialize all completed first kill with the timestamp of beginning of the year ( > 1 minute )
this->currentFirstKills[achievement]=std::chrono::system_clock::from_time_t(t);
} while (fkAchievements->NextRow());
}
}

View File

@@ -0,0 +1,38 @@
#ifndef AZTH_FIRST_KILL_H
#define AZTH_FIRST_KILL_H
#include "Common.h"
#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "DBCStores.h"
#include "Player.h"
#include <chrono>
class Player;
enum FirstKills:uint32 {
ACHI_NAXXRAMAS=1402, //-- "Conqueror of Naxxramas"
ACHI_OBSIDIAN=456, //-- "Obsidian Slayer",
ACHI_MAGIC_SEEKER=1400, //-- "Magic Seeker",
ACHI_DEATH_DEMISE=3117, //-- "Death's Demise",
ACHI_CELESTIAL_DEFENDER=3259, //-- "Celestial Defender",
ACHI_GRAND_CRUSADER=4078, //-- "Grand Crusader",
ACHI_FALL_OF_LK=4576, //-- "Fall of the Lich King",
};
class AzthFirstKills
{
public:
static AzthFirstKills* instance();
void loadCurrentFirstkills();
bool isRealmCompleted(AchievementEntry const* achievement, bool originalValue);
void setRealmCompleted(AchievementEntry const* achievement);
bool canCompleteAchi(Player *player, uint32 achiId);
private:
std::map<uint32 /*achiID*/, std::chrono::system_clock::time_point /*completionTime*/> currentFirstKills;
};
#define sAzthFirstKills AzthFirstKills::instance()
#endif

View File

@@ -0,0 +1,78 @@
#include "AzthLanguage.h"
#include "AzthLanguageStrings.h"
#include "AzthPlayer.h"
#include "Player.h"
#include "SharedDefines.h"
#include "AZTH.h"
class Player;
AzthLangString::AzthLangString(std::string const def, std::string const it)
{
this->def = def;
this->it = it;
}
AzthLangString::~AzthLangString()
{
}
AzthLang::AzthLang()
{
strings = std::unordered_map<uint32, AzthLangString*>();
}
AzthLang::~AzthLang()
{
//for (map<uint32, AzthLangString*>::iterator it = strings.begin(); it != strings.end(); ++it)
// delete it->second;
}
AzthLang* AzthLang::instance()
{
static AzthLang instance;
return &instance;
}
void AzthLang::add(uint32 strId, std::string const def, std::string const it)
{
this->strings[strId]=new AzthLangString(def,it);
}
const char * AzthLang::get(uint32 strId, Player const* pl) const
{
AzthCustomLangs loc = AZTH_LOC_EN;
if (pl)
loc = sAZTH->GetAZTHPlayer((Player*)pl)->getCustLang();
std::unordered_map<uint32, AzthLangString*>::const_iterator itr=strings.find(strId);
if (itr != strings.end())
{
switch (loc)
{
case AZTH_LOC_IT:
return itr->second->it.c_str();
break;
case AZTH_LOC_EN:
return itr->second->def.c_str();
break;
}
}
return "Unknown Azth string";
}
const char * AzthLang::getf(uint32 strId, Player const* pl, ...) const
{
const char *format = get(strId, pl);
va_list ap;
char str [2048];
va_start(ap, pl);
vsnprintf(str, 2048, format, ap);
va_end(ap);
const char *ret=&str[0];
return ret;
}

View File

@@ -0,0 +1,38 @@
#ifndef AZTHLANGUAGE_H
#define AZTHLANGUAGE_H
#include "Config.h"
#include "Common.h"
#include <unordered_map>
class Player;
class AzthLangString {
public:
friend class AzthLang;
AzthLangString(std::string const def, std::string const it);
AzthLangString() {};
~AzthLangString();
private:
std::string def;
std::string it;
};
class AzthLang {
public:
std::unordered_map<uint32, AzthLangString*> strings;
explicit AzthLang();
~AzthLang();
static AzthLang* instance();
void loadStrings();
virtual const char * get(uint32 strId, Player const* pl) const;
virtual const char * getf(uint32 strId, Player const* pl, ...) const;
void add(uint32 strId, std::string const def, std::string const it);
};
#define sAzthLang AzthLang::instance()
#endif /* AZTHLANGUAGE_H */

View File

@@ -0,0 +1,142 @@
#include "AzthLanguageStrings.h"
void AzthLang::loadStrings() {
this->add(AZTH_LANG_REMOVED_ITEMS,
"Items removed from npc",
"Item rimossi dall'npc");
this->add(AZTH_LANG_PVP_NPC_SET_ADVICE,
"Current equipped items will be moved in bag, make sure you have enough space. Do you want continue?",
"Gli item attualmente equippati saranno spostati nella borsa, assicurati di avere abbastanza spazio. Vuoi proseguire?");
this->add(AZTH_LANG_PVP_NPC_CANNOT_EQUIP,
"Item |cffff0000|Hitem:%u::::::::::::|h[%s]|h|r cannot be equipped, maybe it's unique and you already got or you don't have the requirements",
"L'item |cffff0000|Hitem:%u::::::::::::|h[%s]|h|r non può essere equippato, forse è unico e già lo possiedi oppure non hai i requisiti");
this->add(AZTH_LANG_RESET_AURAS_ADVICE,
"Reset aura can only be used while in rest state and not in combat! Go to an Inn",
"Il comando reset aura può essere utilizzato solo mentre si è in rest e non in combat. Recati in una locanda.");
this->add(AZTH_LANG_SHOW_BANK_ITEMS,
"Show my deposited items, from %u to %u",
"Mostra gli items depositati, da %u a %u");
this->add(AZTH_LANG_INSTANCE_ONLY, "Must be in instance!", "Devi essere in un instance!");
this->add(AZTH_LANG_RAID_COMBAT, "One of your raid member is in combat!", "Uno dei membri del raid è in combat!");
this->add(AZTH_LANG_GROUP_LEVEL_REG, "|cffff0000 %s level has been registered in group with value: %s. Group size: %u|r", "|cffff0000 Il livello di %s è stato registrato all'interno del gruppo con il valore: %s. Dimensione gruppo: %u|r");
this->add(AZTH_LANG_INSTANCE_LEVEL_REG, "|cffff0000 %s level has been registered in this instance with value: %s. Players in instance: %u|r", "|cffff0000 Il livello di %s è stato registrato all'interno dell'instance con il valore: %s. Players in instance: %u|r");
//common
this->add(AZTH_LANG_COMMON_TEMPORARILY, "temporarily", "temporaneamente");
this->add(AZTH_LANG_COMMON_NOTVALIDPARAMTER, "Parameter not valid", "Parametro non valido");
this->add(AZTH_LANG_CHECK_EMAIL, "Check your mailbox", "Controlla la tua mail!");
this->add(AZTH_LANG_BAG_FULL_SENT_TO_MAIL, "Hai le borse piene! Controlla la mailbox!", "Hai le borse piene! Controlla la mailbox!");
//collection npc
this->add(AZTH_LANG_COLLECTION_DEPOSIT_ITEMS, "Store Items from your main backpack", "Deposita un item dalla tua borsa principale");
this->add(AZTH_LANG_COLLECTION_SEARCH_ITEMS, "Search an item by name", "Ricerca un item per nome");
this->add(AZTH_LANG_COLLECTION_SEARCH_ITEMS_CODE, "Insert name, and press accept button", "Inserisci il nome e premi sul bottone accept");
this->add(AZTH_LANG_COLLECTION_ITEM_NOT_RECOVERED, "Item not recovered, unique? bag full?", "Item non recuperato, unique? borse piene?");
this->add(AZTH_LANG_COLLECTION_ITEM_NOT_VALID, "This item is not valid", "Questo item non è valido");
this->add(AZTH_LANG_COLLECTION_ITEM_WITH_DURATION, "Unable to store items with a duration", "Non è possibile depositare items con una durata temporanea!");
this->add(AZTH_LANG_COLLECTION_ITEM_NOT_EMPTY_BAG, "Unable to store bag not empty", "Non è possibile depositare borse non vuote!");
this->add(AZTH_LANG_COLLECTION_ITEM_NOT_STACKED, "Unable to store not stacked item", "Non possono essere depositati item raggruppati in un unico slot (stacked)");
this->add(AZTH_LANG_COLLECTION_ITEM_ASHEN_BAND, "Unable to store the Ashen Band", "Non è possibile depositare l'Ashen Band!");
this->add(AZTH_LANG_COLLECTION_ITEM_ALREADY_STORED, "You have already deposited this item", "Hai già depositato questo item!");
this->add(AZTH_LANG_COLLECTION_ITEM_STORED, "Item stored", "Item depositato");
//multidimension
this->add(AZTH_LANG_MULTIDIMENSION_CLASSIC_EXPCHECK, "|cffff0000 You are in the Classic dimension, you can not access the maps of a most recent expansions|r", "|cffff0000 Sei nella dimensione Classic, non è possibile accedere a mappe di espansioni più recenti|r");
this->add(AZTH_LANG_MULTIDIMENSION_TBC_EXPCHECK, "|cffff0000 You are in the TBC dimension, you can not access the maps of a most recent expansions|r", "|cffff0000 Sei nella dimensione TBC, non è possibile accedere a mappe di espansioni più recenti|r");
this->add(AZTH_LANG_MULTIDIMENSION_GUILD_GROUPCHECK, "|cffff0000 You can not access in a group with characters of other guilds that are in Guild dimension|r", "|cffff0000 Non è possibile entrare in gruppo con personaggi di altre gilde presenti nella dimensione Guild World|r");
this->add(AZTH_LANG_MULTIDIMENSION_TW_CHECK60, "You must be at level 60 or lower to access this dimension, try using Timewalking", "E' necessario essere di livello 60 o inferiore per entrare in questa dimensione, prova ad usare il Timewalking");
this->add(AZTH_LANG_MULTIDIMENSION_TW_CHECK70, "You must be at level 70 or lower to access this dimension, try using Timewalking", "E' necessario essere di livello 70 o inferiore per entrare in questa dimensione, prova ad usare il Timewalking");
this->add(AZTH_LANG_MULTIDIMENSION_GUILD_ACCESSCHECK, "You must be in a guild to access this dimension", "E' necessario essere in una gilda per entrare in questa dimensione!");
this->add(AZTH_LANG_MULTIDIMENSION_GM_ACCESSCHECK, "You must be a Game Master to access this dimension", "E' necessario essere un Game Master per accedere a questa dimensione!");
this->add(AZTH_LANG_MULTIDIMENSION_TEMP_TELEPORT, "|cffff0000 You have been teleported into the dimension ", "|cffff0000 Sei stato trasportato nella dimensione ");
this->add(AZTH_LANG_MULTIDIMENSION_CANNOT_BE_SUMMONED, "|cffff0000 You cannot be summoned in this dimension!|r", "|cffff0000 Non puoi essere summonato in questa dimensione!|r");
this->add(AZTH_LANG_MULTIDIMENSION_CANNOT_BE_SUMMONED_SUMMONER, "|cffff0000 You can not summon a player from dimension %s to dimension %s |r", "|cffff0000 Non puoi summonare il player dalla dimensione %s alla dimensione %s |r");
//PvP instant Set/Items
this->add(AZTH_LANG_PVPITEMS_LEVEL_CHECK, "|cffff0000|Hitem:%u::::::::::::|h[%s]|h|r has too high level!", "|cffff0000|Hitem:%u::::::::::::|h[%s]|h|r ha un livello troppo alto!");
this->add(AZTH_LANG_PVPITEMS_MLEVEL_CHECK, "|cffff0000 Your medium item level is too high: %u|r", "|cffff0000 Il tuo item level medio è troppo alto: %u|r");
this->add(AZTH_LANG_PVPITEMS_REMOVED, "The tournament PvP set has been removed", "Il set pvp tournament e' stato rimosso");
this->add(AZTH_LANG_PVPITEMS_FORCE_REMOVED, "Your PVP set has been removed, you can not change zone with a temporary set equipped!", "Il tuo set PVP e' stato rimosso, non puoi cambiare zona con un set temporaneo!");
//full pvp accounts
this->add(AZTH_LANG_PVPACCOUNT_DUNGEON, "You are using a Full-PvP characters, you can not join raid or dungeons.", "Stai usando un personaggio Full-PvP, non puoi partecipare a raid/dungeons.");
//custom commands
this->add(AZTH_LANG_CCOMMANDS_QUEST, "Syntax: .qc $quest\n\nCheck if $quest has a bug.", "Sintassi: .qc $quest\n\nControlla se la $quest è buggata.");
this->add(AZTH_LANG_CCOMANDS_QUEST_HASBUG, "[%s] has a bug!", "[%s] è buggata!");
this->add(AZTH_LANG_CCOMANDS_QUEST_HASBUGANDCOMPLETED, "[%s] has a bug so it has been completed!", "[%s] è buggata ed è stata completata!");
this->add(AZTH_LANG_CCOMANDS_QUEST_NOBUG, "[%s] not seems to has a bug, if you think it has, report it in bugtracker, thanks.", "[%s] non risulta essere buggata, se ritieni che lo sia ti preghiamo di segnalarcelo utilizzando il bugtracker.");
//timewalking
this->add(AZTH_LANG_TW_LEVEL_MAX, "This mode has maximum item level: %u", "Questa modalità ha l'item level massimo: %u");
this->add(AZTH_LANG_TW_MODE_ON, "You are in |cffff0000 Timewalking level: %s|r mode", "Sei in modalità |cffff0000 Timewalking livello: %s|r");
this->add(AZTH_LANG_TW_MODE_OFF, "You exited from |cffff0000 Timewalking|r mode!", "Sei uscito dalla modalità |cffff0000 Timewalking!|r");
this->add(AZTH_LANG_TW_NEW_ITEM_OBTAINED, "Congrats! you got |cffff0000|Hitem:%u::::::::::::|h[%s]|h|r x%d|r ", "Complimenti! hai ottenuto |cffff0000|Hitem:%u::::::::::::|h[%s]|h|r x%d|r ");
this->add(AZTH_LANG_TW_GROUP_CHECK_LEADER, "|cffff0000 Invited Player is not at your same Timewalking Level!|r", "|cffff0000 Il Player invitato non è al tuo stesso livello di Timewalking!|r");
this->add(AZTH_LANG_TW_GROUP_CHECK_PLAYER, "|cffff0000 The Leader is in Timewalking, you must set Timewalking at same level of the leader party to join|r", "|cffff0000 Il Leader del party è in Timewalking. Devi settare il suo stesso livello per poter entrare nel party!|r");
this->add(AZTH_LANG_TW_MOA_BONUS, "Marks of Azeroth bonus gained for level %s!", "Ottenuto bonus Marks of Azeroth per il livello %s!");
this->add(AZTH_LANG_TW_ASREP_BONUS, "AzerothShard reputation bonus gained for level: %s!", "Ottenuto bonus reputazione con AzerothShard per il livello %s!");
this->add(AZTH_LANG_TW_BOSS_KILLED, "Defeated %u of %u Bosses in this instance in %u minutes", "Sconfitti %u su %u Bosses in questa incursione. Tempo impiegato: %u minuti.");
this->add(AZTH_LANG_TW_LAST_BOSS_KILLED, "Congratulations! Final Boss Defeated!", "Congratulazioni! Boss finale SCONFITTO!");
this->add(AZTH_LANG_TW_INSTANCE_COMPLETED, "AMAZING! All bosses has been defeated!", "SBALORDITIVO! Tutti i boss sono stati sconfitti!");
this->add(AZTH_LANG_TW_REP_REMOVED_KILL, "|cffff0000 AzerothShard Reputation Lost:|r you've killed a low level boss, shame on you!", "|cffff0000 Reputazione con AzerothShard persa:|r vergognati! hai ucciso un boss di basso livello!");
this->add(AZTH_LANG_TW_REP_REMOVED_LOGOUT, "|cffff0000 AzerothShard Reputation Lost.|r last Adventure activity: %d days", "|cffff0000 Reputazione con AzerothShard persa.|r Ultima attività dell'Adventure: %d giorni.");
//season tournament
this->add(AZTH_LANG_TOURNAMENT_LEVEL_TOOHIGH, "|cffff0000|Hitem:%u::::::::::::|h[%s]|h|r has a too high level! Remove it to play this season.", "|cffff0000|Hitem:%u::::::::::::|h[%s]|h|r ha un livello troppo alto! Rimuovilo per poter giocare questa season.");
this->add(AZTH_LANG_TOURNAMENT_LEVEL_ACTUAL, "Current season only allows items with |cffff0000%d|r maximum level", "L'attuale Season ha livello massimo |cffff0000%d|r");
//ss
this->add(AZTH_LANG_SS_README, "THINGS TO KNOW!", "COSE DA SAPERE!");
this->add(AZTH_LANG_SS_TELEPORT_BACK, "Teleport me back", "Riportami indietro");
this->add(AZTH_LANG_SS_TELEPORT_DISABLED, "Teleport has been currently disabled", "Il teleport è attualmente disabilitato");
this->add(AZTH_LANG_SS_BACK, "Back", "Indietro");
this->add(AZTH_LANG_SS_VALUE, "Insert a value" , "Inserisci un valore");
this->add(AZTH_LANG_SS_POSSES_CHECK, "|CFF7BBEF7[SmartStone]|r: You already have a smartstone!", "|CFF7BBEF7[SmartStone]|r: Hai già una smartstone!");
this->add(AZTH_LANG_SS_NEWAPP, "You have just unlocked a new app for your SmartStone", "Hai sbloccato una nuova app per la tua SmartStone!");
this->add(AZTH_LANG_SS_CHANGE_RACE, "Relog to change race", "Rilogga per cambiare razza");
this->add(AZTH_LANG_SS_CHANGE_FACTION, "Relog to change faction", "Rilogga per cambiare fazione");
this->add(AZTH_LANG_SS_CHANGE_NAME, "Relog to change name!", "Rilogga per cambiare nome!");
//hs
this->add(AZTH_LANG_HS_QUESTS,"===== Quests: =====", "===== Missioni: =====");
this->add(AZTH_LANG_HS_PVP_QUEST,"PvP Daily Quest: %s","Missione PvP giornaliera: %s");
this->add(AZTH_LANG_HS_DAILY_QUEST,"PvE Daily Quest: %s","Missione PvE giornaliera: %s");
this->add(AZTH_LANG_HS_WEEKLY_QUEST,"Weekly Quest: %s","Missione settimanale: %s");
this->add(AZTH_LANG_HS_TW_QUESTS,"===== Adventure Quests: =====","===== Missioni Adventure: =====");
this->add(AZTH_LANG_HS_TW_WEEKLY_QUEST,"Raid: %s","Incursione: %s");
this->add(AZTH_LANG_HS_TW_WEEKLY_RANDOM_QUEST,"Random Raid: %s","Incursione casuale: %s");
this->add(AZTH_LANG_HS_TW_DAILY_QUEST,"Daily quest: %s","Missione giornaliera: %s");
this->add(AZTH_LANG_HS_TW_DAILY_RANDOM_QUEST,"Random Daily quest: %s","Missione giornaliera casuale: %s");
this->add(AZTH_LANG_HS_QUEST_LIMIT_REACHED,"You reached the limit of this quest category in your quest log, remove or complete one before.","Hai raggiunto il limite massimo di quest di tale categoria nel tuo quest log, rimuovine o completane una prima.");
this->add(AZTH_LANG_HS_QUEST_LIMIT_SUFFIX,"[LIMIT REACHED]","[LIMITE RAGGIUNTO]");
//bg item level
this->add(AZTH_LANG_BG_ITEM_LEVEL_RESET, "Max item level set to its default value.","L'item level massimo e' stato riportato al valore predefinito.");
this->add(AZTH_LANG_BG_ITEM_LEVEL_CHANGED, "Max item level changed.", "L'item level massimo e' stato cambiato.");
//rating bonus
this->add(AZTH_LANG_BR_ACTIVE_BONUS,"|CFF7BBEF7[Rating Bonus]|r: Active bonus on %s %.2fx.","|CFF7BBEF7[Rating Bonus]|r: Bonus attivo in %s %.2fx.");
this->add(AZTH_LANG_BR_NO_BONUS,"|CFF7BBEF7[Rating Bonus]|r: There are no bonuses right now!.","|CFF7BBEF7[Rating Bonus]|r: Non ci sono bonus attivi!.");
//donation vendor
this->add(AZTH_LANG_DONATION_UPDATE_MENU, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tUpdate menu", "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tAggiorna");
this->add(AZTH_LANG_DONATION_BACK, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack..", "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tIndietro..");
this->add(AZTH_LANG_DONATION_ITEM_RECEIVED, "Item received: |cffff0000|Hitem:%u::::::::::::|h[%s]|h|r", "Item ricevuto: |cffff0000|Hitem:%u::::::::::::|h[%s]|h|r");
this->add(AZTH_LANG_DONATION_ITEM_NO_DB, "Error: item doesn't exist in database!", "Errore: l'item non esiste nel database!");
//dimension npc
this->add(AZTH_LANG_DIMENSION_CURRENT, "Currenlty you are on dimension: ", "Attualmente sei nella dimensione: ");
this->add(AZTH_LANG_DIMENSION_ILLUSORY, "Illusory World: Standard Dimension", "[PRINCIPALE] Illusory World: Dimensione standard.");
this->add(AZTH_LANG_DIMENSION_GUILD, "Guild World: Guild Houses dimension", "Guild World: Dimensione delle case di gilda.");
this->add(AZTH_LANG_DIMENSION_PVP, "Corrupted World: PvP Dimension", "Corrupted World: Dimensione riservata al pvp");
this->add(AZTH_LANG_DIMENSION_ENTERTAIN, "Toys Land: Entertaining World events", "Toys Land: Dimensione dedicata agli eventi di intrattenimento");
this->add(AZTH_LANG_DIMENSION_GDR, "Warcraft Tales: RPG Dimension", "Warcraft Tales: Dimensione dedicata al GDR");
this->add(AZTH_LANG_DIMENSION_LVL60, "Classic World: Level 60 Dimension", "Classic World: Dimensione con livello limite 60");
this->add(AZTH_LANG_DIMENSION_LVL70, "TBC World: Level 70 Dimension", "TBC World: Dimensione con livello limite 70");
this->add(AZTH_LANG_DIMENSION_TEST, "Test World: Dimension reserverd for test (be careful!)", "Test World: Dimensione riservata ai test (siate cauti!)");
this->add(AZTH_LANG_DIMENSION_GM, "GameMaster World: Dimension for GM and Developers", "GameMaster World: Benvenuti GM e Developers, questo è il vostro mondo!");
}

View File

@@ -0,0 +1,122 @@
#ifndef AZTHLANGUAGE_STRINGS_H
#define AZTHLANGUAGE_STRINGS_H
#include "AzthLanguage.h" // including LanguageStrings.h will include the system too
enum AzthLangStrEnum
{
AZTH_LANG_REMOVED_ITEMS = 0,
AZTH_LANG_PVP_NPC_SET_ADVICE,
AZTH_LANG_PVP_NPC_CANNOT_EQUIP,
AZTH_LANG_RESET_AURAS_ADVICE,
AZTH_LANG_SHOW_BANK_ITEMS,
AZTH_LANG_INSTANCE_ONLY,
AZTH_LANG_RAID_COMBAT,
AZTH_LANG_GROUP_LEVEL_REG,
AZTH_LANG_INSTANCE_LEVEL_REG,
//collection npc
AZTH_LANG_COLLECTION_DEPOSIT_ITEMS,
AZTH_LANG_COLLECTION_SEARCH_ITEMS,
AZTH_LANG_COLLECTION_SEARCH_ITEMS_CODE,
AZTH_LANG_COLLECTION_ITEM_NOT_RECOVERED,
AZTH_LANG_COLLECTION_ITEM_NOT_VALID,
AZTH_LANG_COLLECTION_ITEM_WITH_DURATION,
AZTH_LANG_COLLECTION_ITEM_NOT_EMPTY_BAG,
AZTH_LANG_COLLECTION_ITEM_NOT_STACKED,
AZTH_LANG_COLLECTION_ITEM_ASHEN_BAND,
AZTH_LANG_COLLECTION_ITEM_ALREADY_STORED,
AZTH_LANG_COLLECTION_ITEM_STORED,
//common
AZTH_LANG_COMMON_TEMPORARILY,
AZTH_LANG_COMMON_NOTVALIDPARAMTER,
AZTH_LANG_CHECK_EMAIL,
AZTH_LANG_BAG_FULL_SENT_TO_MAIL,
//ss
AZTH_LANG_SS_README,
AZTH_LANG_SS_TELEPORT_BACK,
AZTH_LANG_SS_TELEPORT_DISABLED,
AZTH_LANG_SS_BACK,
AZTH_LANG_SS_VALUE,
AZTH_LANG_SS_POSSES_CHECK,
AZTH_LANG_SS_NEWAPP,
AZTH_LANG_SS_CHANGE_RACE,
AZTH_LANG_SS_CHANGE_FACTION,
AZTH_LANG_SS_CHANGE_NAME,
//hs
AZTH_LANG_HS_QUESTS,
AZTH_LANG_HS_PVP_QUEST,
AZTH_LANG_HS_DAILY_QUEST,
AZTH_LANG_HS_WEEKLY_QUEST,
AZTH_LANG_HS_TW_QUESTS,
AZTH_LANG_HS_TW_WEEKLY_QUEST,
AZTH_LANG_HS_TW_WEEKLY_RANDOM_QUEST,
AZTH_LANG_HS_TW_DAILY_QUEST,
AZTH_LANG_HS_TW_DAILY_RANDOM_QUEST,
AZTH_LANG_HS_QUEST_LIMIT_REACHED,
AZTH_LANG_HS_QUEST_LIMIT_SUFFIX,
//multidimension
AZTH_LANG_MULTIDIMENSION_CLASSIC_EXPCHECK,
AZTH_LANG_MULTIDIMENSION_TBC_EXPCHECK,
AZTH_LANG_MULTIDIMENSION_GUILD_GROUPCHECK,
AZTH_LANG_MULTIDIMENSION_TW_CHECK60,
AZTH_LANG_MULTIDIMENSION_TW_CHECK70,
AZTH_LANG_MULTIDIMENSION_GUILD_ACCESSCHECK,
AZTH_LANG_MULTIDIMENSION_GM_ACCESSCHECK,
AZTH_LANG_MULTIDIMENSION_TEMP_TELEPORT,
AZTH_LANG_MULTIDIMENSION_CANNOT_BE_SUMMONED,
AZTH_LANG_MULTIDIMENSION_CANNOT_BE_SUMMONED_SUMMONER,
//custom commands
AZTH_LANG_CCOMMANDS_QUEST,
AZTH_LANG_CCOMANDS_QUEST_HASBUG,
AZTH_LANG_CCOMANDS_QUEST_HASBUGANDCOMPLETED,
AZTH_LANG_CCOMANDS_QUEST_NOBUG,
//season tournament
AZTH_LANG_TOURNAMENT_LEVEL_TOOHIGH,
AZTH_LANG_TOURNAMENT_LEVEL_ACTUAL,
//pvp account
AZTH_LANG_PVPACCOUNT_DUNGEON,
//pvp items
AZTH_LANG_PVPITEMS_LEVEL_CHECK,
AZTH_LANG_PVPITEMS_MLEVEL_CHECK,
AZTH_LANG_PVPITEMS_REMOVED,
AZTH_LANG_PVPITEMS_FORCE_REMOVED,
//timewalking & mythic
AZTH_LANG_TW_LEVEL_MAX,
AZTH_LANG_TW_MODE_ON,
AZTH_LANG_TW_MODE_OFF,
AZTH_LANG_TW_NEW_ITEM_OBTAINED,
AZTH_LANG_TW_GROUP_CHECK_LEADER,
AZTH_LANG_TW_GROUP_CHECK_PLAYER,
AZTH_LANG_TW_MOA_BONUS,
AZTH_LANG_TW_ASREP_BONUS,
AZTH_LANG_TW_BOSS_KILLED,
AZTH_LANG_TW_LAST_BOSS_KILLED,
AZTH_LANG_TW_INSTANCE_COMPLETED,
AZTH_LANG_TW_REP_REMOVED_KILL,
AZTH_LANG_TW_REP_REMOVED_LOGOUT,
//rating bonus
AZTH_LANG_BR_ACTIVE_BONUS,
AZTH_LANG_BR_NO_BONUS,
//bg item level
AZTH_LANG_BG_ITEM_LEVEL_RESET,
AZTH_LANG_BG_ITEM_LEVEL_CHANGED,
//donation vendor
AZTH_LANG_DONATION_UPDATE_MENU,
AZTH_LANG_DONATION_ABILITY,
AZTH_LANG_DONATION_BACK,
AZTH_LANG_DONATION_ITEM_RECEIVED,
AZTH_LANG_DONATION_ITEM_NO_DB,
// dimension npc
AZTH_LANG_DIMENSION_CURRENT,
AZTH_LANG_DIMENSION_ILLUSORY,
AZTH_LANG_DIMENSION_GUILD,
AZTH_LANG_DIMENSION_PVP,
AZTH_LANG_DIMENSION_ENTERTAIN,
AZTH_LANG_DIMENSION_GDR,
AZTH_LANG_DIMENSION_LVL60,
AZTH_LANG_DIMENSION_LVL70,
AZTH_LANG_DIMENSION_TEST,
AZTH_LANG_DIMENSION_GM
};
#endif

View File

@@ -0,0 +1,61 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "InstanceSaveMgr.h"
#include "Player.h"
#include "Map.h"
#include "WorldSession.h"
#include "Group.h"
#include "AzthUtils.h"
#include "AZTH.h"
class AzthMiscPlg : public MiscScript
{
public:
AzthMiscPlg() : MiscScript("AzthMiscPlg") { }
void OnConstructPlayer(Player* origin) override
{
sAZTH->AddAZTHPlayer(origin);
}
void OnDestructPlayer(Player* origin) override
{
sAZTH->DeleteAZTHPlayer(origin);
}
// [AZTH-DISABLED]
// void OnConstructObject(Object* origin) override
// {
// sAZTH->AddAZTHObject(origin);
// }
// void OnDestructObject(Object* origin) override
// {
// sAZTH->DeleteAZTHObject(origin);
// }
// void OnConstructGroup(Group* origin) override
// {
// sAZTH->AddAZTHGroup(origin);
// }
// void OnDestructGroup(Group* origin) override
// {
// sAZTH->DeleteAZTHGroup(origin);
// }
// void OnConstructInstanceSave(InstanceSave* origin) override
// {
// sAZTH->AddAZTHInstanceSave(origin);
// }
// void OnDestructInstanceSave(InstanceSave* origin) override
// {
// sAZTH->DeleteAZTHInstanceSave(origin);
// }
};
void AddSC_azth_misc_plg() {
new AzthMiscPlg();
}

View File

@@ -0,0 +1,12 @@
#include "AzthObject.h"
AzthObject::AzthObject(Object* /*origin*/)
{
m_dataUint32.clear();
m_dataFloat.clear();
}
AzthObject::~AzthObject() {
m_dataUint32.clear();
m_dataFloat.clear();
}

63
src/ASCommon/AzthObject.h Normal file
View File

@@ -0,0 +1,63 @@
#ifndef AZTHOBJECT_H
#define AZTHOBJECT_H
#include "Config.h"
#include "Common.h"
#include <unordered_map>
enum EUint32Fields
{
AZTH_U32FIELD_PLAYER_EXTRA_MOUNT_STATUS,
};
//enum EFloatFields
//{
//
//};
class Object;
class AzthObject
{
public:
explicit AzthObject(Object *origin);
~AzthObject();
void setBoolValue(uint32 index, bool value)
{
m_dataUint32[index] = value ? 1 : 0;
}
bool getBoolValue(uint32 index)
{
return m_dataUint32[index] > 0;
}
void setUint32Value(uint32 index, uint32 value)
{
m_dataUint32[index] = value;
}
uint32 getUint32Value(uint32 index)
{
return m_dataUint32[index];
}
void setFloatValue(uint32 index, float value)
{
m_dataFloat[index] = value;
}
float getfloatValue(uint32 index)
{
return m_dataFloat[index];
}
typedef std::unordered_map<uint32 /*index*/, uint32 /*value*/> DataUint32;
DataUint32 m_dataUint32;
typedef std::unordered_map<uint32 /*index*/, float /*value*/> DataFloat;
DataFloat m_dataFloat;
};
#endif /* AZTHOBJECT_H */

705
src/ASCommon/AzthPlayer.cpp Normal file
View File

@@ -0,0 +1,705 @@
/*
*/
#include "AzthPlayer.h"
#include "Chat.h"
#include "Define.h"
#include "ObjectAccessor.h"
#include "World.h"
#include "AzthLevelStat.h"
#include "Unit.h"
#include "Pet.h"
#include "Player.h"
#include "SpellAuras.h"
#include "AccountMgr.h"
#include "MapMgr.h"
#include "MapInstanced.h"
#include "InstanceScript.h"
#include "ArenaSeason.h"
#include "AzthAchievement.h"
#include "AzthUtils.h"
#include "LFGMgr.h"
#include "AzthFirstKills.h"
#include "AZTH.h"
class Aura;
AzthPlayer::AzthPlayer(Player* origin)
{
playerQuestRate = sWorld->getRate(RATE_XP_QUEST);
player = origin;
customLang = AZTH_LOC_EN;
groupLevel = 0;
tmpLevelPg = 0;
std::fill_n(arena1v1Info, 7, 0);
std::fill_n(arena3v3Info, 7, 0);
autoScalingPending = 0;
m_isPvP = false;
m_itemsInBank.clear();
}
AzthPlayer::~AzthPlayer()
{
m_itemsInBank.clear();
}
void AzthPlayer::InitWowarmoryFeeds()
{
// Clear feeds
m_wowarmory_feeds.clear();
}
void AzthPlayer::setCustLang(AzthCustomLangs code)
{
this->customLang = code;
}
AzthCustomLangs AzthPlayer::getCustLang()
{
return this->customLang;
}
bool AzthPlayer::AzthMaxPlayerSkill()
{
Player* target = player;
if (!target)
return false;
if (target->getLevel() < 80)
{
ChatHandler(player->GetSession()).PSendSysMessage(LANG_LEVEL_MINREQUIRED, 80);
return false;
}
static const SkillSpells spells[] =
{ ONE_HAND_AXES,
TWO_HAND_AXES,
ONE_HAND_MACES,
TWO_HAND_MACES,
POLEARMS,
ONE_HAND_SWORDS,
TWO_HAND_SWORDS,
STAVES,
BOWS,
GUNS,
DAGGERS,
WANDS,
CROSSBOWS,
FIST_WEAPONS,
THROWN
};
std::list<SkillSpells> learnList;
std::size_t max = (sizeof(spells) / sizeof(spells[0]));
for (std::size_t s = 0; s < max; s++)
{
SkillSpells spell = spells[s];
switch (target->getClass())
{
case CLASS_WARRIOR:
if (spell != WANDS)
learnList.push_back(spell);
break;
case CLASS_DEATH_KNIGHT:
case CLASS_PALADIN:
if (spell != THROWN && spell != STAVES && spell != BOWS && spell != GUNS && spell != DAGGERS &&
spell != WANDS && spell != CROSSBOWS && spell != FIST_WEAPONS)
learnList.push_back(spell);
break;
case CLASS_HUNTER:
if (spell != ONE_HAND_MACES && spell != TWO_HAND_MACES && spell != WANDS)
learnList.push_back(spell);
break;
case CLASS_ROGUE:
if (spell != TWO_HAND_AXES && spell != TWO_HAND_MACES && spell != POLEARMS &&
spell != TWO_HAND_SWORDS && spell != STAVES && spell != WANDS)
learnList.push_back(spell);
break;
case CLASS_PRIEST:
if (spell == WANDS || spell == ONE_HAND_MACES || spell == STAVES ||
spell == DAGGERS)
learnList.push_back(spell);
break;
case CLASS_SHAMAN:
if (spell != THROWN && spell != ONE_HAND_SWORDS && spell != TWO_HAND_SWORDS && spell != POLEARMS &&
spell != BOWS && spell != GUNS && spell != WANDS && spell != CROSSBOWS)
learnList.push_back(spell);
break;
case CLASS_WARLOCK:
case CLASS_MAGE:
if (spell == WANDS || spell == ONE_HAND_SWORDS || spell == STAVES ||
spell == DAGGERS)
learnList.push_back(spell);
break;
case CLASS_DRUID:
if (spell != THROWN && spell != ONE_HAND_SWORDS && spell != TWO_HAND_SWORDS &&
spell != BOWS && spell != GUNS && spell != WANDS && spell != CROSSBOWS &&
spell != ONE_HAND_AXES && spell != TWO_HAND_AXES)
learnList.push_back(spell);
break;
default:
break;
}
}
for (std::list<SkillSpells>::const_iterator spell = learnList.begin(), end = learnList.end(); spell != end; ++spell)
if (!target->HasSpell(uint32(*spell)))
target->learnSpell(uint32(*spell));
target->UpdateSkillsToMaxSkillsForLevel();
return true;
}
void AzthPlayer::AddBankItem(uint32 itemEntry, uint32 itemGuid)
{
m_itemsInBank[itemEntry] = itemGuid;
}
void AzthPlayer::DelBankItem(uint32 itemEntry)
{
m_itemsInBank.erase(itemEntry);
}
AzthPlayer::ItemInBankMap& AzthPlayer::GetBankItemsList()
{
return m_itemsInBank;
}
bool AzthPlayer::canEnterMap(MapEntry const* entry, InstanceTemplate const* /*instance*/, bool /*loginCheck*/)
{
// CHECK BG or ARENA requirements (item level limit for example)
if (entry->IsBattlegroundOrArena() && !canJoinQueue(AZTH_QUEUE_BG_OR_ARENA))
{
player->SendTransferAborted(entry->MapID, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
uint32 curDimension = getCurrentDimensionByAura();
Difficulty targetDifficulty;
targetDifficulty = player->GetDifficulty(entry->IsRaid());
if (!entry->IsBattlegroundOrArena() && !sLFGMgr->inLfgDungeonMap(player->GetGUID(), entry->MapID, targetDifficulty))
{
// we could use GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId) for a more accurate chech (?)
if (curDimension == DIMENSION_60 && entry->Expansion() > 0) {
// CLASSIC EXPANSION CHECK
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_CLASSIC_EXPCHECK, player));
player->SendTransferAborted(entry->MapID, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
} if (curDimension == DIMENSION_70 && entry->Expansion() > 1) {
// TBC EXPANSION CHECK
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_TBC_EXPCHECK, player));
player->SendTransferAborted(entry->MapID, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
}
/*
* CUSTOM ITEM LEVEL CHECK
*/
uint32 ilvl = getMaxItemLevelByStatus();
if (ilvl > 0 && !checkItems(ilvl) && (entry->IsDungeon() || entry->IsBattlegroundOrArena()))
{
ChatHandler(player->GetSession()).PSendSysMessage("|cffff0000 This zone is limited to item level: %d|r", getMaxItemLevelByStatus());
player->SendTransferAborted(entry->MapID, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
/*
* FULL PVP CHECK
*/
if (isPvP() && entry->IsDungeon())
{
ChatHandler(player->GetSession()).PSendSysMessage("|cffff0000 PvP Characters cannot enter Dungeons and Raids|r");
player->SendTransferAborted(entry->MapID, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
return true;
}
bool AzthPlayer::canGroup(Player* with)
{
// player -> who invites
// with -> the invited player
Group* group = player->GetGroupInvite() != nullptr ? player->GetGroupInvite() : player->GetGroup();
Player* leader = nullptr;
Player* invited = nullptr;
if (group)
leader = ObjectAccessor::FindPlayer(group->GetLeaderGUID());
if (with)
{
invited = with;
if (!leader)
leader = player;
}
else
invited = player;
if (leader && sAZTH->GetAZTHPlayer(leader)->isTimeWalking() && sAZTH->GetAZTHPlayer(invited)->GetTimeWalkingLevel() != sAZTH->GetAZTHPlayer(leader)->GetTimeWalkingLevel())
{
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_TW_GROUP_CHECK_LEADER, player));
ChatHandler(with->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_TW_GROUP_CHECK_PLAYER, with));
return false;
}
if (with)
{
uint32 curDimPlayer = sAZTH->GetAZTHPlayer(player)->getCurrentDimensionByPhase();
uint32 curDimWith = sAZTH->GetAZTHPlayer(with)->getCurrentDimensionByPhase();
/*if (curDimPlayer != curDimWith) {
ChatHandler(player->GetSession()).PSendSysMessage("|cffff0000 Non è possibile entrare in gruppo con PG di dimensioni diverse|r");
return false;
}*/
if (curDimPlayer == DIMENSION_GUILD || curDimWith == DIMENSION_GUILD)
{
if (player->GetGuildId() != with->GetGuildId()) {
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_GUILD_GROUPCHECK, player));
ChatHandler(with->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_GUILD_GROUPCHECK, with));
return false;
}
}
}
return true;
}
bool AzthPlayer::canJoinQueue(AzthQueueMasks /* type */)
{
// [AZTH-DISABLED]
// if ((type & AZTH_QUEUE_ARENA) == type)
// if (!sASeasonMgr->canJoinArenaOrBg(player))
// return false;
return true;
}
// this is the most accurate check to avoid exploit in some conditions
uint32 AzthPlayer::getCurrentDimensionByPhase() const
{
return sAzthUtils->getCurrentDimensionByPhase(player->GetPhaseMask());
}
uint32 AzthPlayer::getCurrentDimensionByMark() const
{
Aura* aura = player->GetAura(DIMENSION_SPELL_MARK);
// if no aura, then assume we're on DIMENSION_NORMAL
uint32 currentDim = aura ? aura->GetStackAmount() : DIMENSION_NORMAL;
return currentDim;
}
uint32 AzthPlayer::getCurrentDimensionByAura() const
{
uint32 dim = getCurrentDimensionByPhase();
if (dim == DIMENSION_NORMAL)
dim = getCurrentDimensionByMark(); // double integrity check
return player->HasAura(DIMENSION_SPELL_MARK + dim) ? dim : DIMENSION_NORMAL;
}
bool AzthPlayer::hasDimSpecificAura(uint32 dim)
{
return player->HasAura(DIMENSION_SPELL_MARK + dim);
}
bool AzthPlayer::canExplore()
{
uint32 currentDim = getCurrentDimensionByPhase();
if (sAzthUtils->isPhasedDimension(currentDim))
return false;
return true;
}
bool AzthPlayer::changeDimension(uint32 dim, bool validate /* = false*/, bool temp /* =false */)
{
// dimension we're marked for
// this property will contain the special dimension
// even if we're temporary in normal (no phasing auras)
uint32 markedDimension = getCurrentDimensionByMark();
// real dimension based on auras. If we've the
// DIMENSION_SPELL_MARK but no auras then this property will contain
// DIM_NORMAL (temporary case)
uint32 auraDimension = getCurrentDimensionByAura();
// this is the most accurate check for validity since
// with an exploit we could have a special dimension phase even without auras
// then we must not allow it
//uint32 phaseDimension = getCurrentDimensionByPhase();
bool changed = false;
/*bool inGmParty=false;
if (player->GetGroup()) {
uint32 leaderGuid=player->GetGroup()->GetLeaderGUID();
if (Player* leader = ObjectAccessor::FindPlayer(leaderGuid)) {
if (leader->GetSession()->GetSecurity() > SEC_PLAYER) {
inGmParty=true;
}
}
}*/
if (validate)
{
/*if (auraDimension != dim && !inGmParty && player->GetGroup()) {
ChatHandler(player->GetSession()).SendSysMessage("Non è possibile cambiare dimensione mentre si è in gruppo");
return false;
}*/
if (dim == DIMENSION_60) {
if (player->getLevel() > 60 && sAZTH->GetAZTHPlayer(player)->GetTimeWalkingLevel() != TIMEWALKING_LVL_AUTO) {
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_TW_CHECK60, player));
return false;
}
}
if (dim == DIMENSION_70) {
if (player->getLevel() > 70 && sAZTH->GetAZTHPlayer(player)->GetTimeWalkingLevel() != TIMEWALKING_LVL_AUTO) {
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_TW_CHECK70, player));
return false;
}
}
if (dim == DIMENSION_GUILD) {
if (!player->GetGuild()) {
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_GUILD_ACCESSCHECK, player));
return false;
}
}
if (dim == DIMENSION_GM) {
if (player->GetSession()->GetSecurity() <= SEC_PLAYER) {
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->get(AZTH_LANG_MULTIDIMENSION_GM_ACCESSCHECK, player));
return false;
}
}
}
/*if (!inGmParty) {
if (phaseDimension != dim && player->GetGroup()) {
// if we changed phase and we're grouped
// then we should ungroup to avoid exploits
///- If the player is in a group (or invited), remove him. If the group if then only 1 person, disband the group.
player->UninviteFromGroup();
if (player->GetGroup())
player->RemoveFromGroup();
}
}*/
if (!temp)
{
if (markedDimension > DIMENSION_NORMAL) {
player->RemoveAura(DIMENSION_SPELL_MARK);
changed = true;
}
}
if (auraDimension > DIMENSION_NORMAL)
{
player->RemoveAura(DIMENSION_SPELL_MARK + auraDimension);
changed = true;
}
if (dim > DIMENSION_NORMAL)
{
if (!temp) {
player->SetAuraStack(DIMENSION_SPELL_MARK, player, dim);
}
player->SetAuraStack(DIMENSION_SPELL_MARK + dim, player, 1);
changed = true;
}
if (changed)
{
player->CastSpell(player, 35517, true);
std::string msg = sAzthLang->get(AZTH_LANG_MULTIDIMENSION_TEMP_TELEPORT, player);
std::string dimName = sAzthUtils->getDimensionName(dim);
std::string suffix = temp ? sAzthLang->get(AZTH_LANG_COMMON_TEMPORARILY, player) : "";
msg += " <" + dimName + "> " + suffix + " |r";
ChatHandler(player->GetSession()).PSendSysMessage("%s", msg.c_str());
}
return changed;
}
bool AzthPlayer::canCompleteCriteria(AchievementCriteriaEntry const* criteria)
{
if (!criteria)
return true;
// first kill checks for timewalking, boss state etc
if (!sAzthFirstKills->canCompleteAchi(player, criteria->referredAchievement))
return false;
// achievements/criteria should not be completed in dimensions
uint32 currentDimension = getCurrentDimensionByAura();
if (sAzthUtils->isPhasedDimension(currentDimension))
return false;
return true;
}
uint32 AzthPlayer::getMaxItemLevelByStatus()
{
// timewalking case
if (isTimeWalking())
{
uint32 twLimit = getTwItemLevel(GetTimeWalkingLevel());
if (twLimit)
return twLimit;
}
// raid case
if (player->GetMap()->IsDungeon() && player->GetMapId() == 631 /*icc*/ )
{
if (InstanceScript * inst = player->GetInstanceScript()) {
//[AZTH]
if (inst->GetData(DATA_AZTH_HARD_MODE))
return 0;
}
return 284; // 284 is the latest equippable level in wow
}
if (player->GetMap()->IsBattlegroundOrArena() || player->GetMap()->IsDungeon())
{
// basically, even if we've an item level limit specific for arena and bg
// we must limit custom weapons there
return 284;
}
return 0; // no limit outside
}
bool AzthPlayer::canEquipItem(ItemTemplate const* proto)
{
// skip bag and quivers
if (proto->InventoryType == INVTYPE_BAG || proto->InventoryType == INVTYPE_QUIVER)
return true;
// it is needed to avoid equip in empty slots
// [AZTH-DISABLED]
// if (hasGear())
// return false;
// [AZTH-DISABLED]
// if (!sASeasonMgr->checkItem(proto, player))
// return false;
if (!checkItem(proto))
return false;
// do not allow to equip items with too high item level
// when not in timewalking: some items doesn't have a required level and can potentially equipped by low level players.
// excluding heirlooms
uint32 calcLevel = sAzthUtils->getCalcReqLevel(proto);
if (!isTimeWalking(true)
&& proto->ScalingStatDistribution == 0
&& player->getLevel() + 15 < static_cast<uint8>(calcLevel))
{
ChatHandler(player->GetSession()).PSendSysMessage("Cannot equip this item. Its level is too high");
return false;
}
//Double ashen block system
if (sAzthUtils->isAshenBand(proto->ItemId))
{
// finger slots
for (uint32 INVENTORY_INDEX = EQUIPMENT_SLOT_FINGER1; INVENTORY_INDEX <= EQUIPMENT_SLOT_FINGER2; INVENTORY_INDEX++)
{
Item* itemToCheck = player->GetItemByPos(INVENTORY_SLOT_BAG_0, INVENTORY_INDEX);
if (itemToCheck != nullptr)
{
if (sAzthUtils->isAshenBand(itemToCheck->GetEntry()))
{
ChatHandler(player->GetSession()).PSendSysMessage("Are you a double ashen abuser?!");
return false;
}
}
}
}
return true;
}
//
// Passing player argument will check the player state and automatically shows a message
//
bool AzthPlayer::checkItem(ItemTemplate const* proto)
{
uint32 _ilvl = getMaxItemLevelByStatus();
if (_ilvl && !sAzthUtils->checkItemLvL(proto, _ilvl))
{
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->getf(AZTH_LANG_PVPITEMS_LEVEL_CHECK, player, proto->ItemId, proto->Name1.c_str()));
return false;
}
return true;
}
bool AzthPlayer::checkItems(uint32 iLvlMax, uint8 type /*=0*/)
{
if (player->IsGameMaster())
return true;
if (type == 0)
{
// cap limit for each item
uint32 INVENTORY_END = 18;
uint32 counter = 0;
for (uint32 INVENTORY_INDEX = 0; INVENTORY_INDEX <= INVENTORY_END; INVENTORY_INDEX++)
{
// don't check tabard or shirt
if (INVENTORY_INDEX == EQUIPMENT_SLOT_TABARD || INVENTORY_INDEX == EQUIPMENT_SLOT_BODY)
continue;
Item* itemToCheck = player->GetItemByPos(INVENTORY_SLOT_BAG_0, INVENTORY_INDEX);
if (itemToCheck != nullptr)
{
if (!sAzthUtils->checkItemLvL(itemToCheck->GetTemplate(), iLvlMax))
{
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->getf(AZTH_LANG_PVPITEMS_LEVEL_CHECK, player, itemToCheck->GetTemplate()->ItemId, itemToCheck->GetTemplate()->Name1.c_str()));
counter++;
}
}
}
return counter == 0;
}
else
{
uint32 avg = 0;
switch (type)
{
case 1:
avg = player->GetAverageItemLevel();
break;
case 2:
avg = player->GetAverageItemLevelForDF();
break;
}
if (avg > iLvlMax)
{
ChatHandler(player->GetSession()).PSendSysMessage(sAzthLang->getf(AZTH_LANG_PVPITEMS_MLEVEL_CHECK, player), avg);
return false;
}
else
return true;
}
}
bool AzthPlayer::isPvPFlagOn(bool def)
{
if (getCurrentDimensionByPhase() == DIMENSION_PVP || getCurrentDimensionByPhase() == DIMENSION_ENTERTAINMENT)
{
player->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP);
return true;
}
return def;
}
bool AzthPlayer::isFFAPvPFlagOn(bool def)
{
if (getCurrentDimensionByPhase() == DIMENSION_PVP || getCurrentDimensionByPhase() == DIMENSION_ENTERTAINMENT)
{
player->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
return true;
}
return def;
}
void AzthPlayer::CreateWowarmoryFeed(uint32 type, uint32 data, uint32 item_guid, uint32 item_quality)
{
/*
* 1 - TYPE_ACHIEVEMENT_FEED
* 2 - TYPE_ITEM_FEED
* 3 - TYPE_BOSS_FEED
*/
if (!player->GetGUID().IsEmpty())
{
sLog->outError("[Wowarmory]: player is not initialized, unable to create log entry!");
return;
}
if (type <= 0 || type > 3)
{
sLog->outError("[Wowarmory]: unknown feed type: %d, ignore.", type);
return;
}
if (data == 0)
{
sLog->outError("[Wowarmory]: empty data (GUID: %u), ignore.", player->GetGUID().GetCounter());
return;
}
WowarmoryFeedEntry feed;
feed.guid = player->GetGUID().GetCounter();
feed.type = type;
feed.data = data;
feed.difficulty = type == 3 ? player->GetMap()->GetDifficulty() : 0;
feed.item_guid = item_guid;
feed.item_quality = item_quality;
feed.counter = 0;
feed.date = time(nullptr);
sLog->outDebug(LOG_FILTER_NONE, "[Wowarmory]: create wowarmory feed (GUID: %u, type: %d, data: %u).", feed.guid, feed.type, feed.data);
m_wowarmory_feeds.push_back(feed);
}
// Solo 3v3
uint32 AzthPlayer::getArena3v3Info(uint8 type)
{
return arena3v3Info[type];
}
void AzthPlayer::setArena3v3Info(uint8 type, uint32 value)
{
arena3v3Info[type] = value;
}
bool AzthPlayer::isInBlackMarket() {
std::vector<float> pos = {player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()};
// (1, 4818.27f, -1971.3f, 1069.75f, 0.174f, 0);
if (player->GetMapId() != 37)
return false;
/*if (player->GetZoneId() != 331)
return false;
if (pos[0] < 2650.f || pos[0] > 3100.f)
return false;
if (pos[1] < 2250.f || pos[1] > -2800.f)
return false;
if (pos[2] < 80.f || pos[2] > 180.f)
return false;
*/
return true;
};

257
src/ASCommon/AzthPlayer.h Normal file
View File

@@ -0,0 +1,257 @@
#ifndef AZTHPLAYER_H
#define AZTHPLAYER_H
#include "AzthSmartStone.h"
#include "Config.h"
#include "Define.h"
#include "CustomRates.h"
#include "AzthSharedDefines.h"
#include <unordered_map>
struct SmartStoneCommand;
class CrossFaction;
class Player;
class SmartStone;
class WorldLocation;
enum AzthQueueMasks
{
AZTH_QUEUE_BG = 1,
AZTH_QUEUE_ARENA = 2,
AZTH_QUEUE_BG_OR_ARENA = 3, // mask BG+Arena
AZTH_QUEUE_LFG = 4
};
//[AZTH] PVP Rank Patch
enum HonorKillPvPRank
{
HKRANK00,
HKRANK01,
HKRANK02,
HKRANK03,
HKRANK04,
HKRANK05,
HKRANK06,
HKRANK07,
HKRANK08,
HKRANK09,
HKRANK10,
HKRANK11,
HKRANK12,
HKRANK13,
HKRANK14,
HKRANKMAX
};
struct WowarmoryFeedEntry
{
uint32 guid; // Player GUID
time_t date; // Log date
uint32 type; // TYPE_ACHIEVEMENT_FEED, TYPE_ITEM_FEED, TYPE_BOSS_FEED
uint32 data; // TYPE_ITEM_FEED: item_entry, TYPE_BOSS_FEED: creature_entry
uint32 item_guid; // Can be 0
uint32 item_quality; // Can be 0
uint8 difficulty; // Can be 0
int counter; // Can be 0
};
typedef std::vector<WowarmoryFeedEntry> WowarmoryFeeds;
// used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
// can't use enum for uint64 values
#define PLAYER_TITLE_DISABLED UI64LIT(0x0000000000000000)
#define PLAYER_TITLE_NONE UI64LIT(0x0000000000000001)
#define PLAYER_TITLE_PRIVATE UI64LIT(0x0000000000000002) // 1
#define PLAYER_TITLE_CORPORAL UI64LIT(0x0000000000000004) // 2
#define PLAYER_TITLE_SERGEANT_A UI64LIT(0x0000000000000008) // 3
#define PLAYER_TITLE_MASTER_SERGEANT UI64LIT(0x0000000000000010) // 4
#define PLAYER_TITLE_SERGEANT_MAJOR UI64LIT(0x0000000000000020) // 5
#define PLAYER_TITLE_KNIGHT UI64LIT(0x0000000000000040) // 6
#define PLAYER_TITLE_KNIGHT_LIEUTENANT UI64LIT(0x0000000000000080) // 7
#define PLAYER_TITLE_KNIGHT_CAPTAIN UI64LIT(0x0000000000000100) // 8
#define PLAYER_TITLE_KNIGHT_CHAMPION UI64LIT(0x0000000000000200) // 9
#define PLAYER_TITLE_LIEUTENANT_COMMANDER UI64LIT(0x0000000000000400) // 10
#define PLAYER_TITLE_COMMANDER UI64LIT(0x0000000000000800) // 11
#define PLAYER_TITLE_MARSHAL UI64LIT(0x0000000000001000) // 12
#define PLAYER_TITLE_FIELD_MARSHAL UI64LIT(0x0000000000002000) // 13
#define PLAYER_TITLE_GRAND_MARSHAL UI64LIT(0x0000000000004000) // 14
#define PLAYER_TITLE_SCOUT UI64LIT(0x0000000000008000) // 15
#define PLAYER_TITLE_GRUNT UI64LIT(0x0000000000010000) // 16
#define PLAYER_TITLE_SERGEANT_H UI64LIT(0x0000000000020000) // 17
#define PLAYER_TITLE_SENIOR_SERGEANT UI64LIT(0x0000000000040000) // 18
#define PLAYER_TITLE_FIRST_SERGEANT UI64LIT(0x0000000000080000) // 19
#define PLAYER_TITLE_STONE_GUARD UI64LIT(0x0000000000100000) // 20
#define PLAYER_TITLE_BLOOD_GUARD UI64LIT(0x0000000000200000) // 21
#define PLAYER_TITLE_LEGIONNAIRE UI64LIT(0x0000000000400000) // 22
#define PLAYER_TITLE_CENTURION UI64LIT(0x0000000000800000) // 23
#define PLAYER_TITLE_CHAMPION UI64LIT(0x0000000001000000) // 24
#define PLAYER_TITLE_LIEUTENANT_GENERAL UI64LIT(0x0000000002000000) // 25
#define PLAYER_TITLE_GENERAL UI64LIT(0x0000000004000000) // 26
#define PLAYER_TITLE_WARLORD UI64LIT(0x0000000008000000) // 27
#define PLAYER_TITLE_HIGH_WARLORD UI64LIT(0x0000000010000000) // 28
#define PLAYER_TITLE_GLADIATOR UI64LIT(0x0000000020000000) // 29
#define PLAYER_TITLE_DUELIST UI64LIT(0x0000000040000000) // 30
#define PLAYER_TITLE_RIVAL UI64LIT(0x0000000080000000) // 31
#define PLAYER_TITLE_CHALLENGER UI64LIT(0x0000000100000000) // 32
#define PLAYER_TITLE_SCARAB_LORD UI64LIT(0x0000000200000000) // 33
#define PLAYER_TITLE_CONQUEROR UI64LIT(0x0000000400000000) // 34
#define PLAYER_TITLE_JUSTICAR UI64LIT(0x0000000800000000) // 35
#define PLAYER_TITLE_CHAMPION_OF_THE_NAARU UI64LIT(0x0000001000000000) // 36
#define PLAYER_TITLE_MERCILESS_GLADIATOR UI64LIT(0x0000002000000000) // 37
#define PLAYER_TITLE_OF_THE_SHATTERED_SUN UI64LIT(0x0000004000000000) // 38
#define PLAYER_TITLE_HAND_OF_ADAL UI64LIT(0x0000008000000000) // 39
#define PLAYER_TITLE_VENGEFUL_GLADIATOR UI64LIT(0x0000010000000000) // 40
#define PLAYER_TITLE_MASK_ALLIANCE_PVP \
(PLAYER_TITLE_PRIVATE | PLAYER_TITLE_CORPORAL | \
PLAYER_TITLE_SERGEANT_A | PLAYER_TITLE_MASTER_SERGEANT | \
PLAYER_TITLE_SERGEANT_MAJOR | PLAYER_TITLE_KNIGHT | \
PLAYER_TITLE_KNIGHT_LIEUTENANT | PLAYER_TITLE_KNIGHT_CAPTAIN | \
PLAYER_TITLE_KNIGHT_CHAMPION | PLAYER_TITLE_LIEUTENANT_COMMANDER | \
PLAYER_TITLE_COMMANDER | PLAYER_TITLE_MARSHAL | \
PLAYER_TITLE_FIELD_MARSHAL | PLAYER_TITLE_GRAND_MARSHAL)
#define PLAYER_TITLE_MASK_HORDE_PVP \
(PLAYER_TITLE_SCOUT | PLAYER_TITLE_GRUNT | \
PLAYER_TITLE_SERGEANT_H | PLAYER_TITLE_SENIOR_SERGEANT | \
PLAYER_TITLE_FIRST_SERGEANT | PLAYER_TITLE_STONE_GUARD | \
PLAYER_TITLE_BLOOD_GUARD | PLAYER_TITLE_LEGIONNAIRE | \
PLAYER_TITLE_CENTURION | PLAYER_TITLE_CHAMPION | \
PLAYER_TITLE_LIEUTENANT_GENERAL | PLAYER_TITLE_GENERAL | \
PLAYER_TITLE_WARLORD | PLAYER_TITLE_HIGH_WARLORD)
#define PLAYER_TITLE_MASK_ALL_PVP \
(PLAYER_TITLE_MASK_ALLIANCE_PVP | PLAYER_TITLE_MASK_HORDE_PVP)
class AzthPlayer
{
public:
explicit AzthPlayer(Player* origin);
~AzthPlayer();
struct AzthAchiData
{
uint32 level;
uint32 levelParty;
uint32 specialLevel;
};
typedef std::unordered_map<uint16 /*achiId*/, AzthAchiData /*data*/> CompletedAchievementMap;
typedef std::unordered_map<uint16 /*critId*/, AzthAchiData /*data*/> CompletedCriteriaMap;
typedef std::unordered_map<uint32 /*entry*/, uint32 /*guid*/> ItemInBankMap;
std::vector<SmartStonePlayerCommand>& getSmartStoneCommands();
std::map<uint32, WorldLocation> getLastPositionInfoFromDB();
// WInfi: TODO private
CompletedAchievementMap m_completed_achievement_map;
CompletedCriteriaMap m_completed_criteria_map;
void SetTempGear(bool hasGear);
// bool hasGear();
void SetPlayerQuestRate(float rate);
/*
Get player quest rate. If player hasn't set it before, returns server
configuration
@returns Quest Rate. If player set his own, return it; if he hasn't it
returns server default
*/
float GetPlayerQuestRate();
// uint32 getArena1v1Info(uint8 type);
// void setArena1v1Info(uint8 type, uint32 value);
uint32 getArena3v3Info(uint8 type);
void setArena3v3Info(uint8 type, uint32 value);
void ForceKilledMonsterCredit(uint32 entry, uint64 guid);
bool passHsChecks(Quest const* qInfo, uint32 entry, uint32& realEntry, ObjectGuid guid);
time_t lastSent = time(nullptr);
void addSmartStoneCommand(SmartStonePlayerCommand command, bool query);
void addSmartStoneCommand(uint32 id, bool query, uint64 dateExpired, int32 charges);
void removeSmartStoneCommand(SmartStonePlayerCommand command, bool query);
void decreaseSmartStoneCommandCharges(uint32 id);
bool BuySmartStoneCommand(ObjectGuid vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot);
bool hasSmartStoneCommand(uint32 id);
void loadAzthPlayerFromDB();
bool AzthMaxPlayerSkill();
bool AzthSelfChangeXp(float rate);
WorldLocation& getLastPositionInfo(uint32 dimension);
void setLastPositionInfo(uint32 dimension, WorldLocation posIinfo);
bool isInBlackMarket();
void saveLastPositionInfoToDB(Player* pl);
bool isPvP();
void loadPvPInfo();
AzthCustomLangs getCustLang();
void setCustLang(AzthCustomLangs code);
bool isPvPFlagOn(bool def);
bool isFFAPvPFlagOn(bool def);
void AddBankItem(uint32 itemEntry, uint32 itemGuid);
void DelBankItem(uint32 itemEntry);
void SetBankItemsList(ItemInBankMap itemsInBankList);
ItemInBankMap& GetBankItemsList();
bool canEnterMap(MapEntry const* entry, InstanceTemplate const* instance = nullptr, bool loginCheck = false);
bool canJoinQueue(AzthQueueMasks type);
bool canGroup(Player* with = nullptr);
bool canExplore();
bool canCompleteCriteria(AchievementCriteriaEntry const* criteria);
bool canEquipItem(ItemTemplate const* proto);
bool checkItems(uint32 iLvlMax, uint8 type = 0);
bool checkItem(ItemTemplate const* proto);
uint32 getMaxItemLevelByStatus();
//TIMEWALKING
bool canUseItem(Item* item, bool notify = false);
bool itemCheckReqLevel(ItemTemplate const* item, bool notify = false);
uint32 getPStatsLevel(bool normalized = true, bool checkInstance = true, bool checkGroup = true);
uint32 getGroupLevel(bool normalized = true, bool checkInstance = true);
uint32 getInstanceLevel(bool normalized = true);
uint32 normalizeLvl(uint32 level);
uint32 getGroupSize(bool checkInstance = true);
uint32 getInstanceSize();
uint32 GetTimeWalkingLevel() const;
bool isTimeWalking(bool skipSpecial = false) const;
void SetTimeWalkingLevel(uint32 timeWalkingLevel, bool clearAuras = true, bool save = true, bool login = false);
void prepareTwSpells(uint32 oldLevel);
uint32 getTwItemLevel(uint32 twLevel);
time_t autoScalingPending;
//DIMENSIONS
uint32 getCurrentDimensionByMark() const;
uint32 getCurrentDimensionByPhase() const;
uint32 getCurrentDimensionByAura() const;
bool hasDimSpecificAura(uint32 dim);
bool changeDimension(uint32 dim, bool validate = false, bool temp = false);
// WInfi: TODO private
uint32 instanceID;
// World of Warcraft Armory Feeds
void InitWowarmoryFeeds();
void CreateWowarmoryFeed(uint32 type, uint32 data, uint32 item_guid, uint32 item_quality);
// World of Warcraft Armory Feeds
WowarmoryFeeds m_wowarmory_feeds;
private:
Player* player;
uint32 arena1v1Info[7]; // ARENA_TEAM_END
uint32 arena3v3Info[7]; // ARENA_TEAM_END
uint32 levelPlayer;
uint32 tmpLevelPg;
uint32 groupLevel;
float playerQuestRate, maxQuestRate;
bool m_isPvP;
AzthCustomLangs customLang;
uint32 timeWalkingLevel = 0;
bool PVPTempGear = false;
ItemInBankMap m_itemsInBank;
std::vector<SmartStonePlayerCommand> smartStoneCommands;
std::map<uint32, WorldLocation> lastPositionInfo;
};
#endif /* AZTHPLAYER_H */

View File

@@ -0,0 +1,113 @@
/**
This plugin can be used for common player customizations
*/
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "InstanceSaveMgr.h"
#include "Player.h"
#include "Map.h"
#include "WorldSession.h"
#include "AchievementMgr.h"
#include "AzthGroupMgr.h"
#include "AzthPlayer.h"
#include "azth_custom_hearthstone_mode.h"
#include "AZTH.h"
class AzthPlayerPlg : public PlayerScript
{
public:
AzthPlayerPlg() : PlayerScript("AzthPlayerPlg") { }
// void OnLogin(Player* pl) override
// {
// uint32 accId = pl->GetSession()->GetAccountId();
// // 0
// QueryResult res = LoginDatabase.PQuery("SELECT custom_lang FROM azth_account_info WHERE id = '%d';", accId);
// if (res != nullptr && res->GetRowCount() > 0)
// {
// Field* info = res->Fetch();
// sAZTH->GetAZTHPlayer(pl)->setCustLang(AzthCustomLangs(info[0].GetUInt8()));
// }
// //------------------------------AZTH BANK ITEMS----------------------------------------------
// QueryResult itemInBankQuery = CharacterDatabase.PQuery("SELECT item,itemEntry FROM azth_items_bank where guid = %u", pl->GetGUIDLow()); //retrieve all items from db
// if (itemInBankQuery)
// {
// do
// {
// Field* itemInBankField = itemInBankQuery->Fetch();
// if (!itemInBankField)
// break;
// uint32 itemGUID = itemInBankField[0].GetUInt32();
// uint32 itemEntry = itemInBankField[1].GetUInt32();
// sAZTH->GetAZTHPlayer(pl)->AddBankItem(itemEntry, itemGUID);
// } while (itemInBankQuery->NextRow());
// }
// // GM mods, see anything
// if (pl->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER) /*[/AZTH]*/)
// {
// pl->SetPhaseMask(PHASEMASK_ANYWHERE, false);
// pl->GetSession()->SendSetPhaseShift(PHASEMASK_ANYWHERE);
// }
// }
// void OnLevelChanged(Player* player, uint8 oldLevel) override
// {
// if (!player)
// return;
// if (oldLevel == 9 && !sAZTH->GetAZTHPlayer(player)->isTimeWalking() && sConfigMgr->GetOption<bool>("Azth.LevelBonus.10.Enable", false))
// sAZTH->SendGameMail(player, "Well done!", "You reached level 10, a small present for you by AzerothShard!", 10 * GOLD);
// }
// // logger for custom extended costs
// void OnBeforeStoreOrEquipNewItem(Player* player, uint32 /*vendorslot*/, uint32 &item, uint8 /*count*/, uint8 /*bag*/, uint8 /*slot*/, ItemTemplate const* /*pProto*/, Creature* pVendor, VendorItem const* crItem, bool /*bStore*/) override
// {
// long price = 0;
// if (crItem->ExtendedCost)
// {
// if (crItem->ExtendedCost <= 2997)
// return;
// price = crItem->ExtendedCost;
// price = price * (-1);
// }
// else
// {
// /*ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item);
// if (!pProto)
// {
// return;
// }
// if (crItem->IsGoldRequired(pProto))
// {
// price = pProto->BuyPrice;
// }*/
// return;
// }
// uint32 guid = pVendor ? pVendor->GetEntry() : 0;
// CharacterDatabase.PQuery("INSERT INTO `azth_buy_log` (`playerGuid`, `item`, `vendor`, `price`) VALUES (%u, %u, %u, %ld);",
// player->GetGUIDLow(), item, guid, price);
// }
};
void AddSC_azth_player_plg() {
new AzthPlayerPlg();
}

View File

@@ -0,0 +1,4 @@
#include "AzthSharedDefines.h"
const WorldLocation AzthSharedDef::dalaran = WorldLocation(571, 5804.15f, 624.771f, 647.767f, 1.64f);
const WorldLocation AzthSharedDef::blackMarket = WorldLocation(37, -338.08f, -206.67f, 312.54f, 4.89f);

View File

@@ -0,0 +1,90 @@
#ifndef SHAREDDEFINES_H
#define SHAREDDEFINES_H
#include "Object.h"
/*
enum AzthRbac {
RBAC_PERM_COMMAND_QUESTCOMPLETER = 1000,
RBAC_PERM_COMMAND_AZTH = 1001,
RBAC_PERM_COMMAND_AZTH_MAXSKILL = 1002,
RBAC_PERM_COMMAND_AZTH_XP = 1003,
RBAC_PERM_PVP_CUSTOM = 1004 // Arena Spectator ADDON commands
};
*/
enum SkillSpells {
ONE_HAND_AXES = 196,
TWO_HAND_AXES = 197,
ONE_HAND_MACES = 198,
TWO_HAND_MACES = 199,
POLEARMS = 200,
ONE_HAND_SWORDS = 201,
TWO_HAND_SWORDS = 202,
STAVES = 227,
BOWS = 264,
GUNS = 266,
DAGGERS = 1180,
WANDS = 5009,
CROSSBOWS = 5011,
FIST_WEAPONS = 15590,
THROWN = 2567,
};
enum AzthCustomLangs {
AZTH_LOC_IT = 1,
AZTH_LOC_EN = 0,
};
enum PhaseDimensionsEnum {
DIMENSION_NORMAL = 1,
DIMENSION_GUILD = 2,
DIMENSION_PVP = 3,
DIMENSION_ENTERTAINMENT = 4,
DIMENSION_RPG = 5,
DIMENSION_60 = 6,
DIMENSION_70 = 7,
DIMENSION_TEST = 8,
DIMENSION_GM = 9
};
enum AzthCommonMaps {
NAXXRAMS_RAID = 533,
ULDUAR_RAID = 603,
OBSIDIAN_RAID = 615,
THE_EYE_OF_ETERNITY_RAID = 616,
TRIAL_OF_THE_CRUSADRE_RAID = 649
};
#define MAX_DIMENSION 9
// instances
#define DATA_AZTH_HARD_MODE 10000
// Spells
#define AZTH_RIDE_VEHICLE_SPELL 1002000
#define AZTH_RIDE_VEHICLE_FLY_SPELL 1002004
#define AZTH_RIDE_MOUNT_SPELL 1002001
#define AZTH_RIDE_MOUNT_FLY_SPELL 1002002
#define DIMENSION_SPELL_MARK 1000000
#define AZTH_CUSTOM_SPELL_MIN 900000
// Items
// only usable in tw
#define AZTH_TW_ILVL 246
#define AZTH_TW_ILVL_NORMAL_ONLY 247
#define AZTH_TW_ILVL_SPECIAL_ONLY 248
#define AZTH_MARK_OF_AZEROTH 37711
#define AZTH_AS_REP 948
class AzthSharedDef {
public:
static const WorldLocation dalaran;
static const WorldLocation blackMarket;
};
#endif /* SHAREDDEFINES_H */

View File

@@ -0,0 +1 @@
#include "AzthSystem.h"

11
src/ASCommon/AzthSystem.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef AZTHSYSTEM_H
#define AZTHSYSTEM_H
#include "PluginsMgr.h"
#ifdef AZTH_WITH_UNIT_TEST
#include "tests/AzthTestSystem.h";
#endif
#endif /* AZTHSYSTEM_H */

1075
src/ASCommon/AzthUtils.cpp Normal file

File diff suppressed because it is too large Load Diff

155
src/ASCommon/AzthUtils.h Normal file
View File

@@ -0,0 +1,155 @@
#ifndef AZTH_UTILS_H
#define AZTH_UTILS_H
#include "Common.h"
#include "Define.h"
#include "Config.h"
#include "Item.h"
#include "ItemTemplate.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "Group.h"
#include "SpellAuras.h"
#include "SharedDefines.h"
#include <stdio.h>
#include <time.h>
#include "AzthLevelStat.h"
#include "AzthSharedDefines.h"
class AuraApplication;
class Group;
class AzthUtils
{
public:
static AzthUtils* instance();
std::string INVTYPE_NON_EQUIP_STRING;
std::string INVTYPE_HEAD_STRING;
std::string INVTYPE_NECK_STRING;
std::string INVTYPE_SHOULDERS_STRING;
std::string INVTYPE_BODY_STRING;
std::string INVTYPE_CHEST_STRING;
std::string INVTYPE_WAIST_STRING;
std::string INVTYPE_LEGS_STRING;
std::string INVTYPE_FEET_STRING;
std::string INVTYPE_WRISTS_STRING;
std::string INVTYPE_HANDS_STRING;
std::string INVTYPE_FINGER_STRING;
std::string INVTYPE_TRINKET_STRING;
std::string INVTYPE_WEAPON_STRING;
std::string INVTYPE_SHIELD_STRING;
std::string INVTYPE_RANGED_STRING;
std::string INVTYPE_CLOAK_STRING;
std::string INVTYPE_2HWEAPON_STRING;
std::string INVTYPE_BAG_STRING;
std::string INVTYPE_TABARD_STRING;
std::string INVTYPE_ROBE_STRING;
std::string INVTYPE_WEAPONMAINHAND_STRING;
std::string INVTYPE_WEAPONOFFHAND_STRING;
std::string INVTYPE_HOLDABLE_STRING;
std::string INVTYPE_AMMO_STRING;
std::string INVTYPE_THROWN_STRING;
std::string INVTYPE_RANGEDRIGHT_STRING;
std::string INVTYPE_QUIVER_STRING;
std::string INVTYPE_RELIC_STRING;
AzthUtils();
~AzthUtils();
uint32 selectCorrectSpellRank(uint8 level, uint32 spellId);
float getCustomMultiplier(ItemTemplate const * pProto, uint32 multiplier);
uint32 getCalcReqLevel(ItemTemplate const* pProto);
void learnClassSpells(Player* player, bool new_level);
void loadClassSpells();
void sendMessageToGroup(Player *pl, Group *group, const char* msg);
time_t getStartsOfYear();
bool checkItemLvL(ItemTemplate const* proto,uint32 level);
int getReaction(Unit const* unit, Unit const* target);
bool canFly(Unit* const caster, Unit* originalCaster);
uint32 getFreeSpaceInBags(Player *player);
uint32 calculateItemScalingValue(ItemTemplate const* pProto, Player *pl = NULL);
int32 normalizeFeralAp(int32 feralBonus, int32 extraDPS, ItemTemplate const* pProto, bool isScaling);
uint32 getMaxWeaponSkillByLevel(uint32 level) {
return level * 5;
}
bool isAshenBand(uint32 entry);
SpellCastResult checkSpellCast(Player *player, SpellInfo const* spell, bool notify);
bool canPrepareSpell(Spell *spell, Unit *m_caster, SpellInfo const* m_spellInfo, SpellCastTargets const* targets, AuraEffect const* triggeredByAura);
void onAuraRemove(AuraApplication * aurApp, AuraRemoveMode mode);
// [Timewalking]
uint32 getPositionLevel(bool includeSpecialLvl, Map *map, uint32 zone = 0, uint32 area = 0) const;
uint32 getPositionLevel(bool includeSpecialLvl, Map *map, WorldLocation const& posInfo) const;
uint32 selectSpellForTW(Player* player, uint32 spellId);
void removeTimewalkingAura(Unit * unit);
std::string getLevelInfo(uint32 level);
bool updateTwLevel(Player *player, Group *group=nullptr);
int32 getSpellReduction(Player *player, SpellInfo const* spellProto);
bool isEligibleForBonusByArea(Player const *player);
bool canScaleSpell(SpellInfo const* spellProto);
bool isSpecialSpellForTw(SpellInfo const* spellProto);
bool isNotAllowedSpellForTw(SpellInfo const* spellProto);
void setTwAuras(Unit *unit, AzthLevelStat const *stats, bool apply, bool skipDefense);
void setTwDefense(Player *player, bool apply);
AzthLevelStat const* getTwStats(Player *player, uint32 level);
uint32 maxTwLevel(uint32 sourceLvl, uint32 compareLevel) const;
bool disableEnchant(Player *player, SpellItemEnchantmentEntry const* pEnchant);
// [/Timewalking]
// DIMENSIONS
std::string getDimensionName(uint32 dim);
bool isPhasedDimension(uint32 dim);
PhaseDimensionsEnum getCurrentDimensionByPhase(uint32 phase);
bool dimIntegrityCheck(Unit const* target, uint32 phasemask);
bool isSharedArea(Player *player, MapEntry const *mEntry, uint32 zone, uint32 area);
// /DIMENSIONS
// [Flex Mythic]
bool isMythicLevel(uint32 level);
bool isMythicCompLvl(uint32 reqLvl, uint32 checkLvl);
bool canMythicHere(Unit const* source);
// [/Flex Mythic]
// horde version of objectmgr factionchangeitems map
ObjectMgr::CharacterConversionMap FactionChangeItemsHorde;
std::list<uint32> startSpells[MAX_RACES][MAX_CLASSES];
std::string GetItemIcon(uint32 entry, uint32 width, uint32 height, int x, int y);
std::vector<std::string> getCategoryIconAndNameByItemType(uint32 itemType);
private:
std::map <uint32,PhaseDimensionsEnum> phaseMap;
};
#define sAzthUtils AzthUtils::instance()
#endif

View File

@@ -0,0 +1,27 @@
#include "Configuration/Config.h"
#include "AzthLanguageStrings.h"
#include "AzthUtils.h"
#include "ScriptMgr.h"
#include "AzthFirstKills.h"
#include "DatabaseLoader.h"
class AzthWorldScript : public WorldScript
{
public:
AzthWorldScript() : WorldScript("AzthWorldScript") { }
void OnStartup() override
{
// DatabaseLoader loader("server.worldserver");
// loader
// .AddDatabase(ExtraDatabase, "Extra");
sAzthLang->loadStrings();
sAzthUtils->loadClassSpells();
sAzthFirstKills->loadCurrentFirstkills();
}
};
void AddSC_AzthWorldScript()
{
new AzthWorldScript();
}

View File

@@ -0,0 +1,13 @@
#include "PluginsMgr.h"
//#include "PluginsLoader.h"
AzthPlgMgr::AzthPlgMgr() {
}
AzthPlgMgr::~AzthPlgMgr() {
}
void AzthPlgMgr::Initialization()
{
//AzthAddPlg();
}

34
src/ASCommon/PluginsMgr.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef AZTH_PLG_MGR_H
#define AZTH_PLG_MGR_H
#include "ScriptMgr.h"
class AzerothPlugins : public ScriptObject
{
protected:
AzerothPlugins(const char* name);
public:
//Test function to show usage
virtual void onTest() { }
};
class AzthPlgMgr {
private:
AzthPlgMgr();
~AzthPlgMgr();
public: /* singleton init */
static AzthPlgMgr* instance() {
static AzthPlgMgr instance;
return &instance;
}
void Initialization();
};
#define sAzthPlg AzthPlgMgr::instance()
#endif /* AZTH_PLG_MGR_H */

View File

@@ -0,0 +1,85 @@
/*
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Chat.h"
#include "ScriptMgr.h"
#include "AccountMgr.h"
#include "ArenaTeamMgr.h"
#include "CellImpl.h"
#include "GridNotifiers.h"
#include "Group.h"
#include "Language.h"
#include "Opcodes.h"
#include "Player.h"
#include "Pet.h"
#include "ReputationMgr.h"
#include "CustomRates.h"
#include "AzthSharedDefines.h"
#include "RatingBonus.h"
#include "AzthUtils.h"
#include "AZTH.h"
using namespace Acore::ChatCommands;
class azth_commandscript : public CommandScript
{
public:
azth_commandscript() : CommandScript("azth_commandscript") { }
ChatCommandTable GetCommands() const override
{
static ChatCommandTable azthCommandsTable =
{
{ "arealevel", handlePrintAreaLevel, SEC_PLAYER, Console::No }
};
static ChatCommandTable commandTable =
{
{ "azth", azthCommandsTable}
};
return commandTable;
}
static bool handlePrintAreaLevel(ChatHandler* handler, Optional<PlayerIdentifier> target)
{
if (!target)
target = PlayerIdentifier::FromTargetOrSelf(handler);
if (!target || !target->IsConnected())
{
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
handler->SetSentErrorMessage(true);
return false;
}
Player* targetPlayer = target->GetConnectedPlayer();
WorldLocation pos = WorldLocation(targetPlayer->GetMapId(), targetPlayer->GetPositionX(), targetPlayer->GetPositionY(), targetPlayer->GetPositionZ(), targetPlayer->GetOrientation());
if (uint32 posLvl = sAzthUtils->getPositionLevel(true, targetPlayer->GetMap(), pos))
handler->PSendSysMessage("Current area level: %d", posLvl);
else
handler->PSendSysMessage("No level for this area");
return true;
}
};
void AddSC_azth_commandscript()
{
new azth_commandscript();
}

View File

@@ -0,0 +1 @@
#include "AzthPlgTests.h"

View File

@@ -0,0 +1,7 @@
#ifndef AZTHPLGTESTS_H
#define AZTHPLGTESTS_H
#endif /* AZTHPLGTESTS_H */

View File

@@ -0,0 +1,27 @@
#include "AzthTestSystem.h"
/* [TODO] fix and re-enable
class AzthTestSystem : public WorldScript {
public:
AzthTestSystem() : WorldScript("AzthTestSystem") {
}
void OnStartup() override {
}
public:
void runTests() {
//azth_commandscript cmd = AddSC_azth_commandscript();
//Player *pCurrChar = LoadPlayer(1);
//ChatHandler *ch = ChatHandler(pCurrChar->GetSession())
//cmd->handleAzthMaxSkill(ch);
}
};
void AddTestSystemScripts() {
new AzthTestSystem();
}
*/

View File

@@ -0,0 +1,16 @@
#ifndef AZTHTESTSYSTEM_H
#define AZTHTESTSYSTEM_H
#ifdef AZTH_WITH_UNIT_TEST
#include "AzthSystem.h"
#ifdef AZTH_WITH_PLUGINS
#include "AzthPlgTests.h"
#endif
#ifdef AZTH_WITH_CUSTOM_PLUGINS
#include "AzthCustomPlgTests.h"
#endif
#endif
#endif /* AZTHTESTSYSTEM_H */

384
src/ASPlatform/AZTH.cpp Normal file
View File

@@ -0,0 +1,384 @@
/*
* Copyright (С) since 2019 Andrei Guluaev (Winfidonarleyan/Kargatum) https://github.com/Winfidonarleyan
*/
#include "AZTH.h"
#include "Log.h"
#include "ArenaTeamMgr.h"
#include "BattlegroundMgr.h"
#include "DatabaseEnv.h"
#include "ObjectMgr.h"
#include "Config.h"
#include "Solo3v3.h"
//#include "ExtraDatabase.h"
AZTH* AZTH::instance()
{
static AZTH instance;
return &instance;
}
void AZTH::LoadConfig(bool reload)
{
// PvP Ranks
Tokenizer PvPRankList(sConfigMgr->GetOption<std::string>("PvPRank.HKPerRank", "10,50,100,200,450,750,1300,2000,3500,6000,9500,15000,21000,30000"), ',');
for (uint8 i = 0; i < PvPRankList.size(); i++)
_PvP_Ranks[i] = atoi(PvPRankList[i]);
_RatePvPRankExtraHonor = sConfigMgr->GetOption<float>("PvPRank.Rate.ExtraHonor", 1);
// External Mail
_IsExternalMailEnable = sConfigMgr->GetOption<bool>("ExternalMail", 0);
_ExternalMailInterval = sConfigMgr->GetOption<uint32>("ExternalMailInterval", 1) * MINUTE * IN_MILLISECONDS;
// Custom XP
_CustomXPSecurity = sConfigMgr->GetOption<uint32>("Player.customXP.security", 0);
_CustomXPMax = sConfigMgr->GetOption<float>("Player.customXP.maxValue", 1);
_CustomXPShowOnLogin = sConfigMgr->GetOption<bool>("Player.customXP.showOnLogin", false);
if (!reload)
LoadContainers();
}
void AZTH::LoadContainers()
{
// ArenaSlotByType
if (!ArenaTeam::ArenaSlotByType.count(ARENA_TEAM_1v1))
ArenaTeam::ArenaSlotByType[ARENA_TEAM_1v1] = ARENA_SLOT_1v1;
if (!ArenaTeam::ArenaSlotByType.count(ARENA_TEAM_SOLO_3v3))
ArenaTeam::ArenaSlotByType[ARENA_TEAM_SOLO_3v3] = ARENA_SLOT_SOLO_3v3;
// ArenaReqPlayersForType
if (!ArenaTeam::ArenaReqPlayersForType.count(ARENA_TYPE_1v1))
ArenaTeam::ArenaReqPlayersForType[ARENA_TYPE_1v1] = 2;
if (!ArenaTeam::ArenaReqPlayersForType.count(ARENA_TYPE_3v3_SOLO))
ArenaTeam::ArenaReqPlayersForType[ARENA_TYPE_3v3_SOLO] = 6;
// queueToBg
if (!BattlegroundMgr::queueToBg.count(BATTLEGROUND_QUEUE_1v1))
BattlegroundMgr::queueToBg[BATTLEGROUND_QUEUE_1v1] = BATTLEGROUND_AA;
if (!BattlegroundMgr::queueToBg.count(BATTLEGROUND_QUEUE_3v3_SOLO))
BattlegroundMgr::queueToBg[BATTLEGROUND_QUEUE_3v3_SOLO] = BATTLEGROUND_AA;
// ArenaTypeToQueue
if (!BattlegroundMgr::ArenaTypeToQueue.count(ARENA_TYPE_1v1))
BattlegroundMgr::ArenaTypeToQueue[ARENA_TYPE_1v1] = (BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_1v1;
if (!BattlegroundMgr::ArenaTypeToQueue.count(ARENA_TYPE_3v3_SOLO))
BattlegroundMgr::ArenaTypeToQueue[ARENA_TYPE_3v3_SOLO] = (BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO;
// QueueToArenaType
if (!BattlegroundMgr::QueueToArenaType.count(BATTLEGROUND_QUEUE_1v1))
BattlegroundMgr::QueueToArenaType[BATTLEGROUND_QUEUE_1v1] = (ArenaType)ARENA_TYPE_1v1;
if (!BattlegroundMgr::QueueToArenaType.count(BATTLEGROUND_QUEUE_3v3_SOLO))
BattlegroundMgr::QueueToArenaType[BATTLEGROUND_QUEUE_3v3_SOLO] = (ArenaType)ARENA_TYPE_3v3_SOLO;
}
// Add
void AZTH::AddAZTHPlayer(Player* player)
{
if (_playersStore.count(player))
{
sLog->outError("AZTH::AddAZTHPlayer - _playersStore.count(player)");
return;
}
_playersStore.insert(std::make_pair(player, new AzthPlayer(player)));
}
void AZTH::AddAZTHObject(Object* object)
{
if (_objectsStore.count(object))
{
sLog->outError("AZTH::AddAZTHObject - _objectsStore.count(object)");
return;
}
_objectsStore.insert(std::make_pair(object, new AzthObject(object)));
}
void AZTH::AddAZTHGroup(Group* group)
{
if (_groupStore.count(group))
{
sLog->outError("AZTH::AddAZTHGroup - _groupStore.count(group)");
return;
}
_groupStore.insert(std::make_pair(group, new AzthGroupMgr(group)));
}
void AZTH::AddAZTHInstanceSave(InstanceSave* instanceSave)
{
if (_instanceSaveStore.count(instanceSave))
{
sLog->outError("AZTH::AddAZTHInstanceSave - _instanceSaveStore.count(instanceSave)");
return;
}
_instanceSaveStore.insert(std::make_pair(instanceSave, new AzthInstanceMgr(instanceSave)));
}
void AZTH::AddAZTHLoot(Loot* loot)
{
if (_lootStore.count(loot))
{
sLog->outError("AZTH::AddAZTHLoot - _lootStore.count(instanceSave)");
return;
}
_lootStore.insert(std::make_pair(loot, true));
}
// Get
AzthPlayer* AZTH::GetAZTHPlayer(Player* player)
{
if (!_playersStore.count(player))
{
sLog->outError("AZTH::GetAZTHPlayer - !_playersStore.count(player)");
return nullptr;
}
return _playersStore[player];
}
AzthObject* AZTH::GetAZTHObject(Object* object)
{
if (!_objectsStore.count(object))
{
sLog->outError("AZTH::GetAZTHObject - !_objectsStore.count(object)");
return nullptr;
}
return _objectsStore[object];
}
AzthGroupMgr* AZTH::GetAZTHGroup(Group* group)
{
if (!group)
{
return nullptr;
}
if (!_groupStore.count(group))
{
sLog->outError("AZTH::GetAZTHGroup - !_groupStore.count(group)");
return nullptr;
}
return _groupStore[group];
}
AzthInstanceMgr* AZTH::GetAZTHInstanceSave(InstanceSave* instanceSave)
{
if (!_instanceSaveStore.count(instanceSave))
{
sLog->outError("AZTH::GetAZTHInstanceSave - !_instanceSaveStore.count(instanceSave)");
return nullptr;
}
return _instanceSaveStore[instanceSave];
}
bool AZTH::GetAZTHLoot(Loot* loot)
{
if (!_lootStore.count(loot))
return false;
return _lootStore[loot];
}
// Delete
void AZTH::DeleteAZTHPlayer(Player* player)
{
if (!_playersStore.count(player))
{
sLog->outError("AZTH::DeleteAZTHPlayer - !_playersStore.count(player)");
return;
}
_playersStore.erase(player);
}
void AZTH::DeleteAZTHObject(Object* object)
{
if (!_objectsStore.count(object))
{
sLog->outError("AZTH::DeleteAZTHObject - !_objectsStore.count(object)");
return;
}
_objectsStore.erase(object);
}
void AZTH::DeleteAZTHGroup(Group* group)
{
if (!_groupStore.count(group))
{
sLog->outError("AZTH::DeleteAZTHGroup - !_groupStore.count(group)");
return;
}
_groupStore.erase(group);
}
void AZTH::DeleteAZTHInstanceSave(InstanceSave* instanceSave)
{
if (!_instanceSaveStore.count(instanceSave))
{
sLog->outError("AZTH::DeleteAZTHInstanceSave - !_instanceSaveStore.count(instanceSave)");
return;
}
_instanceSaveStore.erase(instanceSave);
}
void AZTH::DeleteAZTHLoot(Loot* loot)
{
if (!_lootStore.count(loot))
{
sLog->outError("AZTH::DeleteAZTHLoot - !_instanceSaveStore.count(loot)");
return;
}
_lootStore.erase(loot);
}
// PvP Kanks
uint32 AZTH::GetKillsPerRank(uint32 Rank)
{
return Rank < HKRANKMAX ? _PvP_Ranks[Rank] : 0;
}
float AZTH::GetRatePvPRankExtraHonor()
{
return _RatePvPRankExtraHonor;
}
// [AZTH] Custom functions
void AZTH::SendGameMail(Player* receiver, std::string subject, std::string body, uint32 money, uint32 itemId /* =0 */, uint32 itemCount /* =0 */)
{
uint32 receiver_guid = receiver->GetGUID().GetCounter();
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
MailDraft* mail = new MailDraft(subject, body);
if (money)
mail->AddMoney(money);
if (itemId)
{
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemId);
if (pProto)
{
Item* mailItem = Item::CreateItem(itemId, itemCount);
if (mailItem)
{
mailItem->SaveToDB(trans);
mail->AddItem(mailItem);
}
}
}
mail->SendMailTo(trans, receiver ? receiver : MailReceiver(receiver_guid), MailSender(MAIL_NORMAL, 0, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_RETURNED);
delete mail;
CharacterDatabase.CommitTransaction(trans);
}
// External Mail
bool AZTH::IsExternalMailEnable()
{
return _IsExternalMailEnable;
}
uint32 AZTH::GetExternalMailInterval()
{
return _ExternalMailInterval;
}
void AZTH::SendExternalMails()
{
// [AZTH-DISABLED]
// sLog->outString("EXTERNAL MAIL> Sending mails in queue...");
// PreparedStatement* stmt = ExtraDatabase.GetPreparedStatement(EXTRA_GET_EXTERNAL_MAIL);
// PreparedQueryResult result = ExtraDatabase.Query(stmt);
// if (!result)
// {
// sLog->outError("EXTERNAL MAIL> No mails in queue...");
// return;
// }
// CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();n();
// SQLTransaction trans2 = ExtraDatabase.BeginTransaction();
// MailDraft* mail = nullptr;
// do
// {
// Field* fields = result->Fetch();
// uint32 id = fields[0].GetUInt32();
// uint32 receiver_guid = fields[1].GetUInt32();
// std::string subject = fields[2].GetString();
// std::string body = fields[3].GetString();
// uint32 money = fields[4].GetUInt32();
// uint32 itemId = fields[5].GetUInt32();
// uint32 itemCount = fields[6].GetUInt32();
// Player* receiver = ObjectAccessor::FindPlayerByLowGUID(receiver_guid);
// mail = new MailDraft(subject, body);
// if (money)
// mail->AddMoney(money);
// if (itemId)
// {
// ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemId);
// if (pProto)
// {
// Item* mailItem = Item::CreateItem(itemId, itemCount);
// if (mailItem)
// {
// mailItem->SaveToDB(trans);
// mail->AddItem(mailItem);
// }
// }
// else
// sLog->outError("non-existing item");
// }
// mail->SendMailTo(trans, receiver ? receiver : MailReceiver(receiver_guid), MailSender(MAIL_NORMAL, 0, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_RETURNED);
// delete mail;
// stmt = ExtraDatabase.GetPreparedStatement(EXTRA_DEL_EXTERNAL_MAIL);
// stmt->setUInt32(0, id);
// trans2->Append(stmt);
// } while (result->NextRow());
// CharacterDatabase.CommitTransaction(trans);
// ExtraDatabase.CommitTransaction(trans2);
// sLog->outError("EXTERNAL MAIL> ALL MAILS SENT!");
}
// Custom XP
uint32 AZTH::GetCustomXPSecurity()
{
return _CustomXPSecurity;
}
float AZTH::GetCustomXPMax()
{
return _CustomXPMax;
}
bool AZTH::IsCustomXPShowOnLogin()
{
return _CustomXPShowOnLogin;
}

90
src/ASPlatform/AZTH.h Normal file
View File

@@ -0,0 +1,90 @@
#ifndef _AZTH_MODULE_H_
#define _AZTH_MODULE_H_
#include "Common.h"
#include "AzthPlayer.h"
#include "AzthObject.h"
#include "AzthGroupMgr.h"
#include "AzthInstanceMgr.h"
#include "Object.h"
#include "GroupMgr.h"
#include "Player.h"
#include "Spell.h"
#include <unordered_map>
class AZTH
{
public:
static AZTH* instance();
void LoadConfig(bool reload);
void LoadContainers();
// Add in store
void AddAZTHPlayer(Player* player);
void AddAZTHObject(Object* object);
void AddAZTHGroup(Group* group);
void AddAZTHInstanceSave(InstanceSave* instanceSave);
void AddAZTHLoot(Loot* loot);
// Get from store
AzthPlayer* GetAZTHPlayer(Player* player);
AzthObject* GetAZTHObject(Object* object);
AzthGroupMgr* GetAZTHGroup(Group* group);
AzthInstanceMgr* GetAZTHInstanceSave(InstanceSave* instanceSave);
bool GetAZTHLoot(Loot* loot);
// Delete in store
void DeleteAZTHPlayer(Player* player);
void DeleteAZTHObject(Object* object);
void DeleteAZTHGroup(Group* group);
void DeleteAZTHInstanceSave(InstanceSave* instanceSave);
void DeleteAZTHLoot(Loot* loot);
// PVP Rank Patch
uint32 GetKillsPerRank(uint32 Rank);
float GetRatePvPRankExtraHonor();
//[AZTH] in-game mailer
void SendGameMail(Player* receiver, std::string subject, std::string body, uint32 money, uint32 itemId = 0, uint32 itemCount = 0);
// ExternalMail
bool IsExternalMailEnable();
uint32 GetExternalMailInterval();
void SendExternalMails();
// Custom XP
uint32 GetCustomXPSecurity();
float GetCustomXPMax();
bool IsCustomXPShowOnLogin();
private:
typedef std::unordered_map<Player*, AzthPlayer*> AZTHPlayersContainer;
typedef std::unordered_map<Object*, AzthObject*> AZTHObjectsContainer;
typedef std::unordered_map<Group*, AzthGroupMgr*> AZTHGroupsContainer;
typedef std::unordered_map<InstanceSave*, AzthInstanceMgr*> AZTHInstanceSaveContainer;
typedef std::unordered_map<Loot*, bool /*second round*/> AZTHLootContainer;
AZTHPlayersContainer _playersStore;
AZTHObjectsContainer _objectsStore;
AZTHGroupsContainer _groupStore;
AZTHInstanceSaveContainer _instanceSaveStore;
AZTHLootContainer _lootStore;
// PVP Rank Patch
uint32 _PvP_Ranks[HKRANKMAX];
float _RatePvPRankExtraHonor = 0.0f;
// ExternalMail
bool _IsExternalMailEnable = false;
uint32 _ExternalMailInterval = MINUTE * IN_MILLISECONDS;
// Custom XP
uint32 _CustomXPSecurity = 0;
float _CustomXPMax = 0.0f;
bool _CustomXPShowOnLogin = false;
};
#define sAZTH AZTH::instance()
#endif // _AZTH_MODULE_H_

1807
src/ASPlatform/AZTH_SC.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,402 @@
/*
* Copyright (С) since 2019 Andrei Guluaev (Winfidonarleyan/Kargatum) https://github.com/Winfidonarleyan
*/
#include "Solo3v3.h"
#include "ArenaTeamMgr.h"
#include "BattlegroundMgr.h"
#include "Config.h"
#include "Log.h"
#include "ScriptMgr.h"
#include "Chat.h"
#include "DisableMgr.h"
Solo3v3* Solo3v3::instance()
{
static Solo3v3 instance;
return &instance;
}
void Solo3v3::SaveSoloDB(ArenaTeam* team)
{
if (!team)
return;
// Init some variables for speedup the programm
ArenaTeam* realTeams[3];
uint32 itrRealTeam = 0;
for (; itrRealTeam < 3; itrRealTeam++)
realTeams[itrRealTeam] = nullptr;
itrRealTeam = 0;
uint32 oldRating = 0;
// First get the old average rating by looping through all members in temp team and add up the rating
for (auto const& itr : team->GetMembers())
{
ArenaTeam* plrArenaTeam = nullptr;
// Find real arena team for player
for (auto const& itrMgr : sArenaTeamMgr->GetArenaTeams())
{
if (itrMgr.first < 0xFFF00000 && itrMgr.second->GetCaptain() == itr.Guid && itrMgr.second->GetType() == ARENA_TEAM_SOLO_3v3)
{
plrArenaTeam = itrMgr.second; // found!
break;
}
}
if (!plrArenaTeam)
continue; // Not found? Maybe player has left the game and deleted it before the arena game ends.
ASSERT(itrRealTeam < 3);
realTeams[itrRealTeam++] = plrArenaTeam;
oldRating += plrArenaTeam->GetRating(); // add up all ratings from each player team
}
if (team->GetMembersSize() > 0)
oldRating /= team->GetMembersSize(); // Get average
int32 ratingModifier = team->GetRating() - oldRating; // GetRating() contains the new rating and oldRating is the old average rating
itrRealTeam = 0;
// Let's loop again through temp arena team and add the new rating
for (auto const& _itr : team->GetMembers())
{
ArenaTeam* plrArenaTeam = realTeams[itrRealTeam++];
if (!plrArenaTeam)
continue;
ArenaTeamStats atStats = plrArenaTeam->GetStats();
if (int32(atStats.Rating) + ratingModifier < 0)
atStats.Rating = 0;
else
atStats.Rating += ratingModifier;
atStats.SeasonGames = _itr.SeasonGames;
atStats.SeasonWins = _itr.SeasonWins;
atStats.WeekGames = _itr.WeekGames;
atStats.WeekWins = _itr.WeekWins;
for (auto realMemberItr : plrArenaTeam->GetMembers())
{
if (realMemberItr.Guid != plrArenaTeam->GetCaptain())
continue;
realMemberItr.PersonalRating = _itr.PersonalRating;
realMemberItr.MatchMakerRating = _itr.MatchMakerRating;
realMemberItr.SeasonGames = _itr.SeasonGames;
realMemberItr.SeasonWins = _itr.SeasonWins;
realMemberItr.WeekGames = _itr.WeekGames;
realMemberItr.WeekWins = _itr.WeekWins;
}
plrArenaTeam->SetArenaTeamStats(atStats);
plrArenaTeam->NotifyStatsChanged();
plrArenaTeam->SaveToDB();
}
}
uint32 Solo3v3::GetAverageMMR(ArenaTeam* team)
{
if (!team)
return 0;
uint32 matchMakerRating = 0;
uint32 playerDivider = 0;
for (auto const& itr : team->GetMembers())
{
matchMakerRating += itr.MatchMakerRating;
playerDivider++;
}
//x/0 = crash
if (!playerDivider)
playerDivider++;
matchMakerRating /= playerDivider;
return matchMakerRating;
}
void Solo3v3::CleanUp3v3SoloQ(Battleground* bg)
{
// Cleanup temp arena teams for solo 3v3
if (bg->isArena() && bg->isRated() && bg->GetArenaType() == ARENA_TYPE_3v3_SOLO)
{
ArenaTeam* tempAlliArenaTeam = sArenaTeamMgr->GetArenaTeamById(bg->GetArenaTeamIdForTeam(TEAM_ALLIANCE));
ArenaTeam* tempHordeArenaTeam = sArenaTeamMgr->GetArenaTeamById(bg->GetArenaTeamIdForTeam(TEAM_HORDE));
if (tempAlliArenaTeam && tempAlliArenaTeam->GetId() >= MAX_ARENA_TEAM_ID)
{
sArenaTeamMgr->RemoveArenaTeam(tempAlliArenaTeam->GetId());
delete tempAlliArenaTeam;
}
if (tempHordeArenaTeam && tempHordeArenaTeam->GetId() >= MAX_ARENA_TEAM_ID)
{
sArenaTeamMgr->RemoveArenaTeam(tempHordeArenaTeam->GetId());
delete tempHordeArenaTeam;
}
}
}
void Solo3v3::CheckStartSolo3v3Arena(Battleground* bg)
{
if (bg->GetArenaType() != ARENA_TYPE_3v3_SOLO)
return;
if (bg->GetStatus() != STATUS_IN_PROGRESS)
return; // if CheckArenaWinConditions ends the game
bool someoneNotInArena = false;
ArenaTeam* team[2];
team[0] = sArenaTeamMgr->GetArenaTeamById(bg->GetArenaTeamIdForTeam(TEAM_ALLIANCE));
team[1] = sArenaTeamMgr->GetArenaTeamById(bg->GetArenaTeamIdForTeam(TEAM_HORDE));
ASSERT(team[0] && team[1]);
for (int i = 0; i < 2; i++)
{
for (auto const& itr : team[i]->GetMembers())
{
Player* plr = ObjectAccessor::FindPlayer(itr.Guid);
if (!plr)
{
someoneNotInArena = true;
continue;
}
if (plr->GetInstanceId() != bg->GetInstanceID())
{
if (sConfigMgr->GetOption<bool>("Solo.3v3.CastDeserterOnAfk", true))
plr->CastSpell(plr, 26013, true); // Deserter
someoneNotInArena = true;
}
}
}
if (someoneNotInArena && sConfigMgr->GetOption<bool>("Solo.3v3.StopGameIncomplete", true))
{
bg->SetRated(false);
bg->EndBattleground(TEAM_NEUTRAL);
}
}
bool Solo3v3::CheckSolo3v3Arena(BattlegroundQueue* queue, BattlegroundBracketId bracket_id)
{
bool soloTeam[BG_TEAMS_COUNT][MAX_TALENT_CAT]; // 2 teams and each team 3 players - set to true when slot is taken
for (int i = 0; i < BG_TEAMS_COUNT; i++)
for (int j = 0; j < MAX_TALENT_CAT; j++)
soloTeam[i][j] = false; // default false = slot not taken
queue->m_SelectionPools[TEAM_ALLIANCE].Init();
queue->m_SelectionPools[TEAM_HORDE].Init();
uint32 MinPlayersPerTeam = sBattlegroundMgr->isArenaTesting() ? 1 : 3;
bool filterTalents = sConfigMgr->GetOption<bool>("Solo.3v3.FilterTalents", false);
for (int teamId = 0; teamId < 2; teamId++) // BG_QUEUE_PREMADE_ALLIANCE and BG_QUEUE_PREMADE_HORDE
{
for (BattlegroundQueue::GroupsQueueType::iterator itr = queue->m_QueuedGroups[bracket_id][teamId].begin(); itr != queue->m_QueuedGroups[bracket_id][teamId].end(); ++itr)
{
if ((*itr)->IsInvitedToBGInstanceGUID) // Skip when invited
continue;
for (auto const& playerGuid : (*itr)->Players)
{
Player* plr = ObjectAccessor::FindPlayer(playerGuid);
if (!plr)
continue;
if (!filterTalents && queue->m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() + queue->m_SelectionPools[TEAM_HORDE].GetPlayerCount() == MinPlayersPerTeam * 2)
return true;
Solo3v3TalentCat plrCat = GetTalentCatForSolo3v3(plr); // get talent cat
if ((filterTalents && soloTeam[TEAM_ALLIANCE][plrCat] == false) // is slot free in alliance team?
|| (!filterTalents && queue->m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() != MinPlayersPerTeam))
{
if (queue->m_SelectionPools[TEAM_ALLIANCE].AddGroup((*itr), MinPlayersPerTeam)) // added successfully?
{
soloTeam[TEAM_ALLIANCE][plrCat] = true; // okay take this slot
if ((*itr)->teamId != TEAM_ALLIANCE) // move to other team
{
(*itr)->teamId = TEAM_ALLIANCE;
(*itr)->_groupType = BG_QUEUE_PREMADE_ALLIANCE;
queue->m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].push_front((*itr));
itr = queue->m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].erase(itr);
return CheckSolo3v3Arena(queue, bracket_id);
}
}
}
else if ((filterTalents && soloTeam[TEAM_HORDE][plrCat] == false) || !filterTalents) // nope? and in horde team?
{
if (queue->m_SelectionPools[TEAM_HORDE].AddGroup((*itr), MinPlayersPerTeam))
{
soloTeam[TEAM_HORDE][plrCat] = true;
if ((*itr)->teamId != TEAM_HORDE) // move to other team
{
(*itr)->teamId = TEAM_HORDE;
(*itr)->_groupType = BG_QUEUE_PREMADE_HORDE;
queue->m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].push_front((*itr));
itr = queue->m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].erase(itr);
return CheckSolo3v3Arena(queue, bracket_id);
}
}
}
}
}
}
uint32 countAll = 0;
for (int i = 0; i < BG_TEAMS_COUNT; i++)
for (int j = 0; j < MAX_TALENT_CAT; j++)
if (soloTeam[i][j])
countAll++;
return countAll == MinPlayersPerTeam * 2 ||
(!filterTalents && queue->m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount() + queue->m_SelectionPools[TEAM_HORDE].GetPlayerCount() == MinPlayersPerTeam * 2);
}
void Solo3v3::CreateTempArenaTeamForQueue(BattlegroundQueue* queue, ArenaTeam* arenaTeams[])
{
// Create temp arena team
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
{
ArenaTeam* tempArenaTeam = new ArenaTeam(); // delete it when all players have left the arena match. Stored in sArenaTeamMgr
std::vector<Player*> playersList;
uint32 atPlrItr = 0;
for (auto const& itr : queue->m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups)
{
if (atPlrItr >= 3)
break; // Should never happen
for (auto const& itr2 : itr->Players)
{
auto _PlayerGuid = itr2;
if (Player * _player = ObjectAccessor::FindPlayer(_PlayerGuid))
{
playersList.push_back(_player);
atPlrItr++;
}
break;
}
}
std::stringstream ssTeamName;
ssTeamName << "Solo Team - " << (i + 1);
tempArenaTeam->CreateTempArenaTeam(playersList, ARENA_TEAM_SOLO_3v3, ssTeamName.str());
sArenaTeamMgr->AddArenaTeam(tempArenaTeam);
arenaTeams[i] = tempArenaTeam;
}
}
bool Solo3v3::Arena1v1CheckTalents(Player* player)
{
if (!player)
return false;
if (sConfigMgr->GetOption<bool>("Arena.1v1.BlockForbiddenTalents", false) == false)
return true;
uint32 count = 0;
for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
{
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
if (!talentInfo)
continue;
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
{
if (talentInfo->RankID[rank] == 0)
continue;
if (player->HasTalent(talentInfo->RankID[rank], player->GetActiveSpec()))
{
for (int8 i = 0; FORBIDDEN_TALENTS_IN_1V1_ARENA[i] != 0; i++)
if (FORBIDDEN_TALENTS_IN_1V1_ARENA[i] == talentInfo->TalentTab)
count += rank + 1;
}
}
}
if (count >= 36)
{
ChatHandler(player->GetSession()).SendSysMessage("You can't join, because you have invested to much points in a forbidden talent. Please edit your talents.");
return false;
}
else
return true;
}
Solo3v3TalentCat Solo3v3::GetTalentCatForSolo3v3(Player* player)
{
if (!player || !sConfigMgr->GetOption<bool>("Solo.3v3.FilterTalents", false))
return MELEE;
uint32 count[MAX_TALENT_CAT];
for (int i = 0; i < MAX_TALENT_CAT; i++)
count[i] = 0;
for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
{
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
if (!talentInfo)
continue;
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
{
if (talentInfo->RankID[rank] == 0)
continue;
if (player->HasTalent(talentInfo->RankID[rank], player->GetActiveSpec()))
{
for (int8 i = 0; SOLO_3V3_TALENTS_MELEE[i] != 0; i++)
if (SOLO_3V3_TALENTS_MELEE[i] == talentInfo->TalentTab)
count[MELEE] += rank + 1;
for (int8 i = 0; SOLO_3V3_TALENTS_RANGE[i] != 0; i++)
if (SOLO_3V3_TALENTS_RANGE[i] == talentInfo->TalentTab)
count[RANGE] += rank + 1;
for (int8 i = 0; SOLO_3V3_TALENTS_HEAL[i] != 0; i++)
if (SOLO_3V3_TALENTS_HEAL[i] == talentInfo->TalentTab)
count[HEALER] += rank + 1;
}
}
}
uint32 prevCount = 0;
Solo3v3TalentCat talCat = MELEE; // Default MELEE (if no talent points set)
for (int i = 0; i < MAX_TALENT_CAT; i++)
{
if (count[i] > prevCount)
{
talCat = (Solo3v3TalentCat)i;
prevCount = count[i];
}
}
return talCat;
}

131
src/ArenaSolo3v3/Solo3v3.h Normal file
View File

@@ -0,0 +1,131 @@
/*
* Copyright (С) since 2019 Andrei Guluaev (Winfidonarleyan/Kargatum) https://github.com/Winfidonarleyan
*/
#ifndef _SOLO_3V3_H_
#define _SOLO_3V3_H_
#include "Common.h"
#include "ArenaTeamMgr.h"
#include "BattlegroundMgr.h"
#include "Player.h"
enum AZTHArenaType
{
ARENA_TYPE_1v1 = 1, // Custom 1v1 Arena Rated
ARENA_TYPE_3v3_SOLO = 4 // 3v3 soloqueue
};
enum AZTHArenaTeamType
{
ARENA_TEAM_1v1 = 1, // Custom 1v1 Arena Rated
ARENA_TEAM_SOLO_3v3 = 4 // 3v3 soloqueue
};
enum AZTHArenaSlot
{
ARENA_SLOT_1v1 = 3, // Custom 1v1 Arena Rated
ARENA_SLOT_SOLO_3v3 = 4 // 3v3 soloqueue
};
enum AZTHBattlegroundQueueTypeId
{
BATTLEGROUND_QUEUE_1v1 = 11,
BATTLEGROUND_QUEUE_3v3_SOLO = 12
};
// TalentTab.dbc -> TalentTabID
const uint32 FORBIDDEN_TALENTS_IN_1V1_ARENA[] =
{
// Healer
201, // PriestDiscipline
202, // PriestHoly
382, // PaladinHoly
262, // ShamanRestoration
282, // DruidRestoration
// Tanks
//383, // PaladinProtection
//163, // WarriorProtection
0 // End
};
// SOLO_3V3_TALENTS found in: TalentTab.dbc -> TalentTabID
// Warrior, Rogue, Deathknight etc.
const uint32 SOLO_3V3_TALENTS_MELEE[] =
{
383, // PaladinProtection
163, // WarriorProtection
161,
182,
398,
164,
181,
263,
281,
399,
183,
381,
400,
0 // End
};
// Mage, Hunter, Warlock etc.
const uint32 SOLO_3V3_TALENTS_RANGE[] =
{
81,
261,
283,
302,
361,
41,
303,
363,
61,
203,
301,
362,
0 // End
};
const uint32 SOLO_3V3_TALENTS_HEAL[] =
{
201, // PriestDiscipline
202, // PriestHoly
382, // PaladinHoly
262, // ShamanRestoration
282, // DruidRestoration
0 // End
};
enum Solo3v3TalentCat
{
MELEE = 0,
RANGE,
HEALER,
MAX_TALENT_CAT
};
class Solo3v3
{
public:
static Solo3v3* instance();
void SaveSoloDB(ArenaTeam* team);
uint32 GetAverageMMR(ArenaTeam* team);
void CheckStartSolo3v3Arena(Battleground* bg);
void CleanUp3v3SoloQ(Battleground* bg);
bool CheckSolo3v3Arena(BattlegroundQueue* queue, BattlegroundBracketId bracket_id);
void CreateTempArenaTeamForQueue(BattlegroundQueue* queue, ArenaTeam* arenaTeams[]);
// Return false, if player have invested more than 35 talentpoints in a forbidden talenttree.
bool Arena1v1CheckTalents(Player* player);
// Returns MELEE, RANGE or HEALER (depends on talent builds)
Solo3v3TalentCat GetTalentCatForSolo3v3(Player* player);
};
#define sSolo Solo3v3::instance()
#endif // _SOLO_3V3_H_

View File

@@ -0,0 +1,471 @@
/*
* Copyright (С) since 2019 Andrei Guluaev (Winfidonarleyan/Kargatum) https://github.com/Winfidonarleyan
*/
#include "Solo3v3.h"
#include "ScriptMgr.h"
#include "ArenaTeamMgr.h"
#include "BattlegroundMgr.h"
#include "DisableMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ScriptedGossip.h"
#include "Config.h"
#include "AZTH.h"
// SC
class npc_solo3v3 : public CreatureScript
{
public:
npc_solo3v3() : CreatureScript("npc_solo3v3")
{
for (int i = 0; i < MAX_TALENT_CAT; i++)
cache3v3Queue[i] = 0;
lastFetchQueueList = 0;
}
bool OnGossipHello(Player* player, Creature* me)
{
if (!player || !me)
return true;
if (sConfigMgr->GetOption<bool>("Solo.3v3.Enable", true) == false)
{
ChatHandler(player->GetSession()).SendSysMessage("Arena disabled!");
return true;
}
fetchQueueList();
std::stringstream infoQueue;
infoQueue << "Solo 3vs3 Arena\n";
infoQueue << "Queued Players: " << (cache3v3Queue[MELEE] + cache3v3Queue[RANGE] + cache3v3Queue[HEALER]);
if (sConfigMgr->GetOption<bool>("Solo.3v3.FilterTalents", false))
{
infoQueue << "\n\n";
infoQueue << "Queued Melees: " << cache3v3Queue[MELEE] << " (Longer Queues!)" << "\n";
infoQueue << "Queued Casters: " << cache3v3Queue[RANGE] << " (Longer Queues!)" << "\n";
infoQueue << "Queued Healers: " << cache3v3Queue[HEALER] << " (Bonus Rewards!)" << "\n";
}
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, 3, "Are you sure you want to remove the solo queue?", 0, false);
if (!player->GetArenaTeamId(ArenaTeam::GetSlotByType(ARENA_TEAM_SOLO_3v3)))
{
uint32 cost = sConfigMgr->GetOption<uint32>("Solo.3v3.Cost", 1);
if (sAZTH->GetAZTHPlayer(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, 1, "Create new solo arena team?", cost, false);
}
else
{
if (!player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO))
{
//AddGossipItemFor(player,GOSSIP_ICON_INTERACT_1, "Queue up for 1vs1 Wargame\n", GOSSIP_SENDER_MAIN, 20);
AddGossipItemFor(player,GOSSIP_ICON_INTERACT_1, "|TInterface/ICONS/Achievement_Arena_3v3_5:30|t Queue up for 3vs3 Arena Solo\n", GOSSIP_SENDER_MAIN, 2);
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "|TInterface/ICONS/Achievement_Arena_2v2_7:30|t Disband Arena team", GOSSIP_SENDER_MAIN, 5, "Are you sure?", 0, false);
}
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "|TInterface/ICONS/INV_Misc_Coin_01:30|t Show statistics", GOSSIP_SENDER_MAIN, 4);
}
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "|TInterface/ICONS/INV_Misc_Coin_03:30|t How to Use NPC?", GOSSIP_SENDER_MAIN, 8);
AddGossipItemFor(player,GOSSIP_ICON_CHAT, infoQueue.str().c_str(), GOSSIP_SENDER_MAIN, 0);
SendGossipMenuFor(player, 60015, me->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, Creature* me, uint32 /*uiSender*/, uint32 uiAction)
{
if (!player || !me)
return true;
player->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case 1: // Create new Arenateam
{
if (sConfigMgr->GetOption<uint32>("Solo.3v3.MinLevel", 80) <= player->getLevel())
{
int cost = sConfigMgr->GetOption<uint32>("Solo.3v3.Cost", 1);
if (sAZTH->GetAZTHPlayer(player)->isPvP())
cost = 0;
if (cost >= 0 && player->GetMoney() >= uint32(cost) && CreateArenateam(player, me))
player->ModifyMoney(sConfigMgr->GetOption<uint32>("Solo.3v3.Cost", 1) * -1);
}
else
{
ChatHandler(player->GetSession()).PSendSysMessage("You need level %u+ to create an arena team.", sConfigMgr->GetOption<uint32>("Solo.3v3.MinLevel", 80));
}
CloseGossipMenuFor(player);
return true;
}
break;
case 2: // 3v3 Join Queue Arena (rated)
{
// check Deserter debuff
if (player->HasAura(26013) && (sConfigMgr->GetOption<bool>("Solo.3v3.CastDeserterOnAfk", true) || sConfigMgr->GetOption<bool>("Solo.3v3.CastDeserterOnLeave", true)))
{
WorldPacket data;
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
player->GetSession()->SendPacket(&data);
}
else
if (ArenaCheckFullEquipAndTalents(player) && JoinQueueArena(player, me, true, ARENA_TYPE_3v3_SOLO) == false)
ChatHandler(player->GetSession()).SendSysMessage("Something went wrong while joining queue. Already in another queue?");
CloseGossipMenuFor(player);
return true;
}
case 3: // Leave Queue
{
if (player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO))
{
uint8 arenaType = ARENA_TYPE_3v3_SOLO;
WorldPacket Data;
Data << arenaType << (uint8)0x0 << (uint32)BATTLEGROUND_AA << (uint16)0x0 << (uint8)0x0;
player->GetSession()->HandleBattleFieldPortOpcode(Data);
CloseGossipMenuFor(player);
}
return true;
}
case 4: // get statistics
{
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(player->GetArenaTeamId(ArenaTeam::GetSlotByType(ARENA_TEAM_SOLO_3v3)));
if (at) {
std::stringstream s;
s << "Rating: " << at->GetStats().Rating;
s << "\nPersonal Rating: " << player->GetArenaPersonalRating(ArenaTeam::GetSlotByType(ARENA_TEAM_SOLO_3v3));
s << "\nRank: " << at->GetStats().Rank;
s << "\nSeason Games: " << at->GetStats().SeasonGames;
s << "\nSeason Wins: " << at->GetStats().SeasonWins;
s << "\nWeek Games: " << at->GetStats().WeekGames;
s << "\nWeek Wins: " << at->GetStats().WeekWins;
ChatHandler(player->GetSession()).PSendSysMessage("%s", s.str().c_str());
}
return true;
}
case 5: // Disband arenateam
{
WorldPacket Data;
Data << (uint32)player->GetArenaTeamId(ArenaTeam::GetSlotByType(ARENA_TEAM_SOLO_3v3));
player->GetSession()->HandleArenaTeamLeaveOpcode(Data);
ChatHandler(player->GetSession()).PSendSysMessage("Arena team deleted!");
CloseGossipMenuFor(player);
return true;
}
break;
case 8: // Script Info
{
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "Click on Create new 3v3 SoloQ Arena team", GOSSIP_SENDER_MAIN, uiAction);
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "Join 3v3 SoloQ Arena and ready!", GOSSIP_SENDER_MAIN, uiAction);
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "Enjoy!", GOSSIP_SENDER_MAIN, uiAction);
AddGossipItemFor(player,GOSSIP_ICON_CHAT, "<- Back", GOSSIP_SENDER_MAIN, 7);
SendGossipMenuFor(player, 68, me->GetGUID());
return true;
}
break;
}
OnGossipHello(player, me);
return true;
}
private:
int cache3v3Queue[MAX_TALENT_CAT];
uint32 lastFetchQueueList;
bool ArenaCheckFullEquipAndTalents(Player* player)
{
if (!player)
return false;
if (!sConfigMgr->GetOption<bool>("Arena.CheckEquipAndTalents", true))
return true;
std::stringstream err;
if (player->GetFreeTalentPoints() > 0)
err << "You have currently " << player->GetFreeTalentPoints() << " free talent points. Please spend all your talent points before queueing arena.\n";
Item* newItem = NULL;
for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
{
if (slot == EQUIPMENT_SLOT_OFFHAND || slot == EQUIPMENT_SLOT_RANGED || slot == EQUIPMENT_SLOT_TABARD || slot == EQUIPMENT_SLOT_BODY)
continue;
newItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);
if (newItem == NULL)
{
err << "Your character is not fully equipped.\n";
break;
}
}
if (err.str().length() > 0)
{
ChatHandler(player->GetSession()).SendSysMessage(err.str().c_str());
return false;
}
return true;
}
bool JoinQueueArena(Player* player, Creature* me, bool isRated, uint8 arenatype)
{
if (!player || !me)
return false;
if (sConfigMgr->GetOption<uint32>("Solo.3v3.MinLevel", 80) > player->getLevel())
return false;
uint8 arenaslot = ArenaTeam::GetSlotByType(ARENA_TEAM_SOLO_3v3);
uint32 arenaRating = 0;
uint32 matchmakerRating = 0;
// ignore if we already in BG or BG queue
if (player->InBattleground() || player->InBattlegroundQueue())
return false;
//[AZTH]
if (!sAZTH->GetAZTHPlayer(player)->canJoinQueue(AZTH_QUEUE_ARENA))
return false;
//[/AZTH]
//check existance
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(BATTLEGROUND_AA);
if (!bg)
{
sLog->outError("Battleground: template bg (all arenas) not found");
return false;
}
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, BATTLEGROUND_AA, NULL))
{
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ARENA_DISABLED);
return false;
}
BattlegroundTypeId bgTypeId = bg->GetBgTypeID();
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, arenatype);
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), player->getLevel());
if (!bracketEntry)
return false;
// check if already in queue
if (player->GetBattlegroundQueueIndex(bgQueueTypeId) < PLAYER_MAX_BATTLEGROUND_QUEUES)
//player is already in this queue
return false;
// check if has free queue slots
if (!player->HasFreeBattlegroundQueueId())
return false;
uint32 ateamId = 0;
if (isRated)
{
ateamId = player->GetArenaTeamId(arenaslot);
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ateamId);
if (!at)
{
player->GetSession()->SendNotInArenaTeamPacket(arenatype);
return false;
}
// get the team rating for queueing
arenaRating = at->GetRating();
matchmakerRating = sSolo->GetAverageMMR(at);
// the arenateam id must match for everyone in the group
if (arenaRating <= 0)
arenaRating = 1;
}
BattlegroundQueue& bgQueue = sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId);
bg->SetRated(isRated);
GroupQueueInfo* ginfo = bgQueue.AddGroup(player, nullptr, bracketEntry, isRated, false, arenaRating, matchmakerRating, ateamId);
uint32 avgTime = bgQueue.GetAverageQueueWaitTime(ginfo);
uint32 queueSlot = player->AddBattlegroundQueueId(bgQueueTypeId);
// send status packet (in queue)
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype, player->GetTeamId()); //??
player->GetSession()->SendPacket(&data);
sBattlegroundMgr->ScheduleArenaQueueUpdate(arenatype, bgQueueTypeId, bracketEntry->GetBracketId());
sScriptMgr->OnPlayerJoinArena(player);
return true;
}
bool CreateArenateam(Player* player, Creature* me)
{
if (!player || !me)
return false;
uint8 slot = ArenaTeam::GetSlotByType(ARENA_TEAM_SOLO_3v3);
// Check if player is already in an arena team
if (player->GetArenaTeamId(slot))
{
player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, player->GetName(), "", ERR_ALREADY_IN_ARENA_TEAM);
return false;
}
// Teamname = playername
// if team name exist, we have to choose another name (playername + number)
int i = 1;
std::stringstream teamName;
//teamName << "3vs3 Solo - " << player->GetName();
teamName << player->GetName();
do
{
if (sArenaTeamMgr->GetArenaTeamByName(teamName.str()) != NULL) // teamname exist, so choose another name
{
teamName.str(std::string());
teamName << player->GetName() << i++;
}
else
break;
} while (i < 100); // should never happen
// Create arena team
ArenaTeam* arenaTeam = new ArenaTeam();
if (!arenaTeam->Create(player->GetGUID(), ARENA_TEAM_SOLO_3v3, teamName.str(), 4283124816, 45, 4294242303, 5, 4294705149))
{
delete arenaTeam;
return false;
}
// Register arena team
sArenaTeamMgr->AddArenaTeam(arenaTeam);
ChatHandler(player->GetSession()).SendSysMessage("Arena team successful created!");
return true;
}
void fetchQueueList()
{
if (GetMSTimeDiffToNow(lastFetchQueueList) < 1000)
return; // prevent spamming
lastFetchQueueList = getMSTime();
BattlegroundQueue* queue = &sBattlegroundMgr->GetBattlegroundQueue((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO);
//BattlegroundQueue* queue = &sBattlegroundMgr->m_BattlegroundQueues[BATTLEGROUND_QUEUE_3v3_SOLO];
for (int i = 0; i < MAX_TALENT_CAT; i++)
cache3v3Queue[i] = 0;
for (int i = BG_BRACKET_ID_FIRST; i <= BG_BRACKET_ID_LAST; i++)
{
for (int j = 0; j < 2; j++)
{
for (auto queueInfo : queue->m_QueuedGroups[i][j])
{
if (queueInfo->IsInvitedToBGInstanceGUID) // Skip when invited
continue;
for (auto const& playerGuid : queueInfo->Players)
{
Player* _player = ObjectAccessor::FindPlayer(playerGuid);
if (!_player)
continue;
Solo3v3TalentCat plrCat = sSolo->GetTalentCatForSolo3v3(_player); // get talent cat
cache3v3Queue[plrCat]++;
}
}
}
}
}
};
class Solo3v3_BG : public BGScript
{
public:
Solo3v3_BG() : BGScript("Solo3v3_BG") { }
void OnQueueUpdate(BattlegroundQueue* queue, BattlegroundBracketId bracket_id, bool isRated, uint32 /* arenaRatedTeamId */) override
{
if (queue->GetArenaType() != (ArenaType)ARENA_TYPE_3v3_SOLO)
return;
Battleground* bg_template = sBattlegroundMgr->GetBattlegroundTemplate(queue->GetBGTypeID());
if (!bg_template)
return;
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id);
if (!bracketEntry)
return;
// Solo 3v3
if (sSolo->CheckSolo3v3Arena(queue, bracket_id))
{
uint32 minLvl = bracketEntry->minLevel;
uint32 maxLvl = bracketEntry->maxLevel;
Battleground* arena = sBattlegroundMgr->CreateNewBattleground(queue->GetBGTypeID(), minLvl, maxLvl, queue->GetArenaType(), isRated);
if (!arena)
return;
// Create temp arena team and store arenaTeamId
ArenaTeam* arenaTeams[BG_TEAMS_COUNT];
sSolo->CreateTempArenaTeamForQueue(queue, arenaTeams);
// invite those selection pools
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
for (auto const& citr : queue->m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups)
{
citr->ArenaTeamId = arenaTeams[i]->GetId();
BattlegroundMgr::InviteGroupToBG(citr, arena, citr->teamId);
}
// Override ArenaTeamId to temp arena team (was first set in InviteGroupToBG)
arena->SetArenaTeamIdForTeam(TEAM_ALLIANCE, arenaTeams[TEAM_ALLIANCE]->GetId());
arena->SetArenaTeamIdForTeam(TEAM_HORDE, arenaTeams[TEAM_HORDE]->GetId());
// Set matchmaker rating for calculating rating-modifier on EndBattleground (when a team has won/lost)
arena->SetArenaMatchmakerRating(TEAM_ALLIANCE, sSolo->GetAverageMMR(arenaTeams[TEAM_ALLIANCE]));
arena->SetArenaMatchmakerRating(TEAM_HORDE, sSolo->GetAverageMMR(arenaTeams[TEAM_HORDE]));
// start bg
arena->StartBattleground();
}
}
void OnBattlegroundUpdate(Battleground* bg, uint32 /*diff*/) override
{
if (bg->GetStatus() != STATUS_IN_PROGRESS || !bg->isArena())
return;
sSolo->CheckStartSolo3v3Arena(bg);
}
};
void AddSC_Solo_3v3_Arena()
{
new npc_solo3v3();
new Solo3v3_BG();
}

View File

@@ -0,0 +1,45 @@
#include "ChallengeModeMgr.h"
#include "Config.h"
#include "AzthUtils.h"
ChallengeModeMgr* ChallengeModeMgr::instance()
{
static ChallengeModeMgr instance;
return &instance;
}
void ChallengeModeMgr::LoadConfig(bool /* reload */)
{
this->deltaLevelHigher = sConfigMgr->GetOption<uint32>("ChallengeMode.noReward.deltaLevelHigher", 0);
this->deltaLevelLower = sConfigMgr->GetOption<uint32>("ChallengeMode.noReward.deltaLevelLower", 0);
this->startLevelHigher = sConfigMgr->GetOption<uint32>("ChallengeMode.noReward.startLevelHigher", 0);
this->startLevelLower = sConfigMgr->GetOption<uint32>("ChallengeMode.noReward.startLevelLower", 0);
}
bool ChallengeModeMgr::isEligibleForReward(Player const *player) {
if (!player->IsInWorld())
return true;
// disable rewards only for dungeons
if (!player->GetMap()->IsDungeon() && !player->GetMap()->IsRaid())
return true;
WorldLocation pos = WorldLocation(player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
uint32 posLvl=sAzthUtils->getPositionLevel(false, player->GetMap(), pos);
uint32 level = player->getLevel();
// disable reward when the player has a higher level than the one specified in the configs
// it can be useful to force players doing the challenges at the correct level (E.G. during the levelling)
if (this->startLevelLower && this->startLevelLower >= posLvl && level > posLvl && deltaLevelLower >= level - posLvl) {
return false;
}
// disable reward when the player has a lower level than the one specified in the configs
// it can be useful to avoid power-levelling/character-towing or to avoid cheating on certain progression-based servers
if (this->startLevelHigher && posLvl >= this->startLevelHigher && posLvl > level && posLvl - level >= deltaLevelHigher) {
return false;
}
return true;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (С) since 2019 Andrei Guluaev (Winfidonarleyan/Kargatum) https://github.com/Winfidonarleyan
*/
#ifndef _CHALLENGEMODE_MGR_H_
#define _CHALLENGEMODE_MGR_H_
#include "Common.h"
#include "Player.h"
class ChallengeModeMgr
{
public:
static ChallengeModeMgr* instance();
void LoadConfig(bool reload);
bool isEligibleForReward(Player const *player);
[[nodiscard]] uint32 getStartLevelHigher() {
return this->startLevelHigher;
}
[[nodiscard]] uint32 getDeltaLevelLower() {
return this->deltaLevelLower;
}
[[nodiscard]] uint32 getStartLevelLower() {
return this->startLevelLower;
}
[[nodiscard]] uint32 getDeltaLevelHigher() {
return this->deltaLevelHigher;
}
private:
uint32 deltaLevelHigher = 0;
uint32 startLevelHigher = 0;
uint32 deltaLevelLower = 0;
uint32 startLevelLower = 0;
};
#define sChallengeMode ChallengeModeMgr::instance()
#endif // _CHALLENGEMODE_MGR_H_

View File

@@ -0,0 +1,135 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "InstanceSaveMgr.h"
#include "Player.h"
#include "Map.h"
#include "WorldSession.h"
#include "Group.h"
#include "AzthUtils.h"
#include "AZTH.h"
#include "ChallengeModeMgr.h"
class AzthUtils;
class ChallengeModeWorld : public WorldScript
{
public:
ChallengeModeWorld() : WorldScript("ChallengeModeWorld") { }
void OnAfterConfigLoad(bool reload) override
{
sChallengeMode->LoadConfig(reload);
}
};
class ChallengeModeMisc : public MiscScript
{
public:
ChallengeModeMisc() : MiscScript("ChallengeModeMisc") { }
void OnAfterLootTemplateProcess(Loot* /* loot */, LootTemplate const* /* tab */, LootStore const& /* store */, Player* /* lootOwner */, bool /* personal */, bool /* noEmptyError */, uint16 /* lootMode */) override
{
// if (!sConfigMgr->GetOption<bool>("Azth.Multiplies.Drop.Enable", false))
// return;
//Dangerous since it can drops multiple quest items
//[AZTH-DISABLED] give another loot process if done with correct level
// if (sAzthUtils->isEligibleForBonusByArea(lootOwner) && (&store == &LootTemplates_Gameobject || &store == &LootTemplates_Creature))
// {
// sAZTH->AddAZTHLoot(loot);
// tab->Process(*loot, store, lootMode, lootOwner);
// }
}
};
class ChallengeModePlayer : public PlayerScript
{
public:
ChallengeModePlayer() : PlayerScript("ChallengeModePlayer") {
}
bool OnBeforeAchiComplete(Player* player, AchievementEntry const* /* achievement */) override
{
return sChallengeMode->isEligibleForReward(player);
}
bool OnBeforeCriteriaProgress(Player* player, AchievementCriteriaEntry const* /*criteria*/) override
{
return sChallengeMode->isEligibleForReward(player);
}
void OnGiveXP(Player* player, uint32& amount, Unit* /* victim */) override
{
if (!sChallengeMode->isEligibleForReward(player)) {
amount = 0;
}
}
};
class ChallengeModeGlobal : public GlobalScript
{
public:
ChallengeModeGlobal() : GlobalScript("ChallengeModeGlobal") {
}
bool OnBeforeLootEqualChanced(Player const* player, LootStoreItemList /* EqualChanced */, Loot& /* loot */, LootStore const& /* store */) override
{
if (!sChallengeMode->isEligibleForReward(player)) {
return false;
}
return true;
}
bool OnItemRoll(Player const* player, LootStoreItem const */* item */, float &chance, Loot &/* loot */, LootStore const& /* store */) override
{
if (!sChallengeMode->isEligibleForReward(player)) {
chance = 0;
return false;
}
// [AZTH-DISABLED]
// this check assume that sAzthUtils->isEligibleForBonusByArea(player) has been already checked
// if (!sAZTH->GetAZTHLoot(&loot))
// return;
// if ((loot.quest_items.size() + loot.items.size()) >= MAX_NR_LOOT_ITEMS)
// {
// chance = 0;
// return;
// }
// if (chance >= 100.0f || chance <= 0)
// return;
// if (!player->GetMap()->IsDungeon() && !player->GetMap()->IsRaid())
// return;
// if (item->mincount >= 0)
// {
// ItemTemplate const* i = sObjectMgr->GetItemTemplate(item->itemid);
// if (i && i->Quality < ITEM_QUALITY_RARE)
// return;
// }
// if (&store != &LootTemplates_Gameobject && &store != &LootTemplates_Creature)
// return;
// if (chance < 20.f)
// chance += 20.f;
// sAZTH->DeleteAZTHLoot(&loot);
return true;
}
};
void AddSC_challengemode() {
new ChallengeModeMisc();
new ChallengeModeGlobal();
new ChallengeModePlayer();
new ChallengeModeWorld();
}

View File

@@ -0,0 +1,485 @@
/*
* Copyright (C) 2009-2010 Trilogy <http://www.wowtrilogy.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
*
* @File : GuildHouse.cpp
*
* @Authors : Lazzalf
*
* @Date : 31/03/2010
*
* @Version : 0.1
*
**/
#include "GuildHouse.h"
#include "ObjectMgr.h"
#include "GuildMgr.h"
#include "Guild.h"
#include "ObjectAccessor.h"
#include "MapMgr.h"
GuildHouseObject GHobj;
GuildHouseObject::GuildHouseObject()
{
GH_map.clear();
GH_AddHouse.clear();
mGuildGuardID.clear();
}
bool GuildHouseObject::CheckGuildID(uint32 guild_id)
{
if (!guild_id)
return false;
if (!sGuildMgr->GetGuildById(guild_id))
{
// sLog->outDebug(LOG_FILTER_GUILDHOUSE,"The guild %u not found", guild_id);
return false;
}
return true;
}
bool GuildHouseObject::CheckGuildHouse(uint32 guild_id)
{
GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
if (itr == GH_map.end())
return false;
return true;
}
// bool GuildHouseObject::ChangeGuildHouse(uint32 guild_id, uint32 newid)
// {
// if (newid == 0) // Vendi
// {
// GuildHouseMap::iterator itr = GH_map.find(guild_id);
// if (itr == GH_map.end())
// return true;
// sLog->outDetail("Guild %u sold guild house %u! ", guild_id, itr->second.Id);
// QueryResult result = ExtraDatabase.PQuery("UPDATE `guildhouses` SET `guildId` = 0 WHERE `guildId` = %u", guild_id);
// RemoveGuildHouseAdd(itr->second.Id);
// GH_map.erase(guild_id);
// }
// else // Compra
// {
// QueryResult result;
// GuildHouseMap::iterator itr = GH_map.find(guild_id);
// result = ExtraDatabase.PQuery("SELECT `x`, `y`, `z`, `map`, `minguildsize`, `price` FROM `guildhouses` WHERE `id` = %u", newid);
// if (!result)
// return false; // Id doesn't valid
// if (!(itr == GH_map.end()))
// ChangeGuildHouse(guild_id, 0); // remove old House
// uint32 id = newid;
// Field *fields = result->Fetch();
// float x = fields[0].GetFloat();
// float y = fields[1].GetFloat();
// float z = fields[2].GetFloat();
// uint32 map = fields[3].GetUInt32();
// uint32 minguildsize = fields[4].GetUInt32();
// uint32 price = fields[5].GetUInt32();
// uint32 add = 1;
// result = CharacterDatabase.PQuery("SELECT `GuildHouse_Add` FROM `gh_guildadd` WHERE `guildId` = %u", guild_id);
// if (result)
// {
// Field *fields = result->Fetch();
// add = fields[0].GetUInt32();
// }
// else
// {
// CharacterDatabase.PQuery("INSERT INTO `gh_guildadd` (`guildId`,`GuildHouse_Add`) VALUES ( %u , 1 )", guild_id);
// }
// GuildHouse NewGH(guild_id, id, x, y, z, map, minguildsize, price, add);
// GH_map[guild_id] = NewGH;
// sLog->outDetail("Guild %u bought guild house %u! ", guild_id, newid);
// result = ExtraDatabase.PQuery("UPDATE `guildhouses` SET `guildId` = %u WHERE `id` = %u", guild_id, newid);
// AddGuildHouseAdd(newid, add, guild_id);
// }
// return true;
// }
bool GuildHouseObject::GetGuildHouseLocation(uint32 guild_id, float &x, float &y, float &z, float &o, uint32 &map)
{
GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
if (itr == GH_map.end())
return false;
x = itr->second.m_X;
y = itr->second.m_Y;
z = itr->second.m_Z;
o = itr->second.m_orient;
map = itr->second.m_map;
return true;
}
bool GuildHouseObject::GetGuildHouseMap(uint32 guild_id, uint32 &map)
{
GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
if (itr == GH_map.end())
return false;
map = itr->second.m_map;
return true;
}
uint32 GuildHouseObject::GetGuildHouse_Add(uint32 guild_id)
{
GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
if (itr == GH_map.end())
return 0;
return itr->second.GuildHouse_Add;
};
bool GuildHouseObject::Add_GuildhouseAdd(uint32 guild_id, uint32 add)
{
GuildHouseMap::iterator itr = GH_map.find(guild_id);
if (itr == GH_map.end())
return false;
uint32 NewAdd = (uint32(1) << (add-1));
itr->second.AddGuildHouse_Add(NewAdd);
return true;
};
bool GuildHouseObject::RemoveGuildHouseAdd(uint32 id)
{
for (uint32 i = 1; i < NPC_MAX; i++)
{
uint32 find = ((id << 16) | i);
GH_Add::iterator itr = GH_AddHouse.find(find);
if (itr == GH_AddHouse.end())
continue;
if (!(itr->second.spawned)) // Do not despawn if it is already despawned
continue;
gh_Item_Vector::iterator itr2 = itr->second.AddCre.begin();
for (; itr2 != itr->second.AddCre.end(); itr2++)
{
if (CreatureData const* data = sObjectMgr->GetCreatureData(*itr2))
{
sObjectMgr->RemoveCreatureFromGrid(*itr2, data);
Creature* pCreature = sMapMgr->FindMap(data->mapid, 0)->GetCreature(ObjectGuid::Create<HighGuid::Unit>(*itr2, data->id));
if (pCreature)
pCreature->AddObjectToRemoveList();
}
}
itr2 = itr->second.AddGO.begin();
for (; itr2 != itr->second.AddGO.end(); itr2++)
{
if (GameObjectData const* data = sObjectMgr->GetGOData(*itr2))
{
sObjectMgr->RemoveGameobjectFromGrid(*itr2, data);
GameObject* pGameobject = sMapMgr->FindMap(data->mapid, 0)->GetGameObject(ObjectGuid::Create<HighGuid::GameObject>(*itr2, data->id));
if (pGameobject)
pGameobject->AddObjectToRemoveList();
}
}
itr->second.spawned = false;
}
return true;
}
bool GuildHouseObject::AddGuildHouseAdd(uint32 id, uint32 add, uint32 guild)
{
for (uint8 i = 1; i < NPC_MAX; i++)
{
if (((uint32)1 << (i-1)) & add)
{
uint32 find = ((id << 16) | i);
GH_Add::iterator itr = GH_AddHouse.find(find);
if (itr == GH_AddHouse.end())
continue;
if (itr->second.spawned) // Do not respawn if it is already spawned
continue;
gh_Item_Vector::iterator itr2 = itr->second.AddGO.begin();
for (; itr2 != itr->second.AddGO.end(); itr2++)
{
if (GameObjectData const* data = sObjectMgr->GetGOData(*itr2))
{
sObjectMgr->AddGameobjectToGrid(*itr2, data);
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
//sLog->outDebug("Spawning gameobject %u", itr2->first);
if (!pGameobject->LoadFromDB(*itr2, map))
delete pGameobject;
else
{
if (pGameobject->isSpawnedByDefault())
map->AddToMap(pGameobject);
}
}
}
}
itr2 = itr->second.AddCre.begin();
for (; itr2 != itr->second.AddCre.end(); itr2++)
{
if (CreatureData const* data = sObjectMgr->GetCreatureData(*itr2))
{
sObjectMgr->AddCreatureToGrid(*itr2, data);
if (i == 2) //Guard
{
UpdateGuardMap(*itr2, guild);
// sLog->outDebug(LOG_FILTER_GUILDHOUSE, "GuildHouse: insert guard with GUID: %u,Guild: %u", *itr2, guild);
}
mGHUnits[(*itr2)] = new GH_unit(guild, i);
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* pCreature = new Creature;
//sLog->outDebug("Spawning creature %u",itr2->first);
if (!pCreature->LoadFromDB(*itr2, map))
delete pCreature;
else
{
map->AddToMap(pCreature);
}
}
}
}
itr->second.spawned = true;
}
}
return true;
}
void GuildHouseObject::LoadGuildHouse()
{
// GH_map.clear();
// QueryResult result = ExtraDatabase.Query("SELECT `id`,`guildId`,`x`,`y`,`z`,`map`,`minguildsize`,`price` FROM `guildhouses` ORDER BY guildId ASC");
// if (!result)
// {
// sLog->outError("Loaded 0 Guildhouses - NO RESULT FROM QUERY");
// return;
// }
// do
// {
// Field *fields = result->Fetch();
// uint32 id = fields[0].GetUInt32();
// uint32 guildID = fields[1].GetUInt32();
// float x = fields[2].GetFloat();
// float y = fields[3].GetFloat();
// float z = fields[4].GetFloat();
// uint32 map = fields[5].GetUInt32();
// uint32 min_member = fields[6].GetUInt32();
// uint32 cost = fields[7].GetUInt32();
// uint32 add = 1;
// if(guildID)
// {
// if (!CheckGuildID(guildID))
// {
// sLog->outError("Guild %u does not exist - guildhouse not loaded", guildID);
// continue;
// }
// QueryResult result2 = CharacterDatabase.PQuery("SELECT `GuildHouse_Add` FROM `gh_guildadd` WHERE `guildId` = %u", guildID);
// if (result2)
// {
// sLog->outError("Loaded guildadd information for guild %u", guildID);
// Field *fields2 = result2->Fetch();
// add = fields2[0].GetUInt32();
// }
// GuildHouse NewGH(guildID, id, x, y, z, map, min_member, cost, add);
// GH_map[guildID] = NewGH;
// RemoveGuildHouseAdd(id);
// AddGuildHouseAdd(id, add, guildID);
// }
// else
// {
// sLog->outError("Loading GH for guild %u failed - NOT VALID", guildID);
// // do not despawn objects/npc if a guild house does not have a guild, so both GM and players can see
// // a guild house fully if It is not purchased
// //RemoveGuildHouseAdd(id);
// }
// }
// while (result->NextRow());
sLog->outDetail("Loaded %lu Guildhouses", GH_map.size());
}
void GuildHouseObject::LoadGuildHouseAdd()
{
GH_AddHouse.clear();
mGuildGuardID.clear();
sLog->outDetail("Loading GuildHouse npcs - objects...");
QueryResult result = WorldDatabase.Query("SELECT `guid`,`type`,`id`,`add_type` FROM `guildhouses_add` ORDER BY Id ASC");
if (!result)
{
sLog->outError("Loaded 0 guildhouse npcs - objects");
return;
}
do
{
Field *fields = result->Fetch();
uint32 guid = fields[0].GetUInt32();
uint16 type = fields[1].GetUInt16();
uint16 id = fields[2].GetUInt16();
uint16 add_type = fields[3].GetUInt16();
uint32 find = 0;
find = ( (uint32)id << 16 ) | (uint32)add_type;
if (type == CREATURE)
{
if (!sObjectMgr->GetCreatureData(guid))
{
sLog->outError("Data for creature %u not present", guid);
continue;
}
GH_AddHouse[find].AddCre.push_back(guid);
}
else if (type == OBJECT)
{
if (!sObjectMgr->GetGOData(guid))
{
sLog->outError("Data for gameobject %u not present", guid);
continue;
}
GH_AddHouse[find].AddGO.push_back(guid);
}
}
while (result->NextRow());
sLog->outDetail("Loaded %lu Guildhouse objects", GH_AddHouse.size());
}
uint32 GuildHouseObject::GetGuildByGuardID(uint32 guid)
{
GuildGuardID::const_iterator itr = mGuildGuardID.find(guid);
if (itr == mGuildGuardID.end())
return 0;
return itr->second;
}
uint32 GuildHouseObject::GetGuildByGuardID(Creature* guardia)
{
//override della funzione presunta causa del bug delle guardie
uint32 guid = guardia->GetGUID().GetCounter();
GuildGuardID::const_iterator i = mGuildGuardID.begin();
for (; i != mGuildGuardID.end(); ++i)
{
if((*i).first == guid)
return (*i).second;
}
return 0;
}
GH_unit* GuildHouseObject::GetUnitByGuid(uint32 guid) {
if (mGHUnits.find(guid) != mGHUnits.end())
return mGHUnits[guid];
return nullptr;
}
void GuildHouseObject::UpdateGuardMap(uint32 guid, uint32 guild)
{
GuildGuardID::iterator itr = mGuildGuardID.find(guid);
if (itr == mGuildGuardID.end())
mGuildGuardID[guid] = guild;
else
itr->second = guild;
}
GuildHouse::GuildHouse(uint32 guild_id, uint32 guild_add)
{
GuildId = guild_id;
GuildHouse_Add = guild_add;
Id = 0;
m_X = 0;
m_Y = 0;
m_Z = 0;
m_orient = 0;
m_map = 0;
min_member = 0;
price = 0;
}
GuildHouse::GuildHouse(uint32 newGuildId, uint32 newId, float x, float y, float z, uint32 map, uint32 member, uint32 cost, uint32 add)
{
GuildId = newGuildId;
Id = newId;
m_X = x;
m_Y = y;
m_Z = z;
m_map = map;
min_member = member;
price = cost;
m_orient = 0;
GuildHouse_Add = add;
}
void GuildHouse::AddGuildHouse_Add(uint32 NewAdd)
{
GuildHouse_Add |= NewAdd;
QueryResult result = CharacterDatabase.PQuery("UPDATE `gh_guildadd` SET `GuildHouse_Add` = %u WHERE `guildId` = %u", GuildHouse_Add, GuildId);
GHobj.AddGuildHouseAdd(Id, NewAdd, GuildId);
}
void GuildHouseObject::LoadGuildHouseSystem()
{
GHobj.LoadGuildHouseAdd();
GHobj.LoadGuildHouse();
}
void GuildHouseObject::ControlGuildHouse()
{
for (GuildHouseMap::iterator itr = GH_map.begin(); itr != GH_map.end(); itr++)
{
if (Guild* pGuild = sGuildMgr->GetGuildById((*itr).first))
if (pGuild->GetMemberSize() < (*itr).second.min_member)
{
// GHobj.ChangeGuildHouse((*itr).first, 0);
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
if (!pGuild->ModifyBankMoney(trans, (*itr).second.price * 75000, true))
{
continue;
}
CharacterDatabase.CommitTransaction(trans);
sLog->outDetail("GuildHouse %u set to 0 because guild %u has low members ( < %u )", (*itr).first, pGuild->GetId(), (*itr).second.min_member );
}
}
}

130
src/GuildHouse/GuildHouse.h Normal file
View File

@@ -0,0 +1,130 @@
/*
* Copyright (C) 2009-2010 Trilogy <http://www.wowtrilogy.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
*
* @File : GuildHouse.h
*
* @Authors : Lazzalf
*
* @Date : 31/03/2010
*
* @Version : 0.1
*
**/
#ifndef SC_GUILDHOUSE_SYSTEM
#define SC_GUILDHOUSE_SYSTEM
#include "Common.h"
#include "Creature.h"
enum GuildAdd_Type
{
NPC_BASIC = 0x00000001,
NPC_GUARD = 0x00000002,
NPC_BUFFMAN = 0x00000004,
NPC_DUMMY = 0x00000005,
NPC_TELE = 0x00000008,
};
#define NPC_MAX 32
enum GH_Item_type
{
CREATURE = 0,
OBJECT = 1,
};
class GuildHouse
{
public:
GuildHouse(uint32 guild_id = 0, uint32 guild_add = 0);
GuildHouse(uint32 guildID, uint32 id, float x, float y, float z, uint32 map, uint32 member, uint32 cost, uint32 add);
uint32 GuildId;
uint32 Id;
uint32 GuildHouse_Add;
float m_X, m_Y, m_Z, m_orient;
uint32 m_map;
uint32 min_member;
uint32 price;
void AddGuildHouse_Add(uint32 NewAdd);
};
typedef std::vector<uint32> gh_Item_Vector;
class GH_Item
{
public:
gh_Item_Vector AddCre;
gh_Item_Vector AddGO;
bool spawned;
GH_Item()
{
AddCre.clear();
AddGO.clear();
spawned = true;
}
};
class GH_unit{
public:
uint32 guild;
uint8 type;
GH_unit(uint32 guild, uint8 type) {
this->guild = guild;
this->type = type;
}
};
typedef std::unordered_map<uint32, GuildHouse> GuildHouseMap;
typedef std::unordered_map<uint32, GH_Item> GH_Add;
typedef std::unordered_map<uint32, GH_unit*> GuildHouseUnits;
typedef std::unordered_map<uint32, uint32> GuildGuardID;
class GuildHouseObject
{
public:
GuildHouseMap GH_map;
GH_Add GH_AddHouse;
GuildGuardID mGuildGuardID;
GuildHouseUnits mGHUnits;
GuildHouseObject();
void LoadGuildHouse();
void LoadGuildHouseAdd();
bool CheckGuildID(uint32 guild_id);
bool CheckGuildHouse(uint32 guild_id);
bool GetGuildHouseLocation(uint32 guild_id, float &x, float &y, float &z, float &o, uint32 &map);
bool GetGuildHouseMap(uint32 guild_id, uint32 &map);
uint32 GetGuildHouse_Add(uint32 guild_id);
bool Add_GuildhouseAdd(uint32 guild_id, uint32 add);
// bool ChangeGuildHouse(uint32 guild_id, uint32 newid);
bool RemoveGuildHouseAdd(uint32 id);
bool AddGuildHouseAdd(uint32 id, uint32 add, uint32 guild);
void UpdateGuardMap(uint32 guid, uint32 guild);
uint32 GetGuildByGuardID(uint32 guid);
uint32 GetGuildByGuardID(Creature* guardia);
GH_unit* GetUnitByGuid(uint32 guid);
void ControlGuildHouse();
void LoadGuildHouseSystem();
};
extern GuildHouseObject GHobj;
#endif

374
src/GuildHouse/Teleport.cpp Normal file
View File

@@ -0,0 +1,374 @@
/**
*
* @File : sc_npc_teleport.cpp
*
* @Authors : Wilibald09
*
* @Date : 28/08/2008
*
* @Version : 1.2
*
**/
#include "Teleport.h"
#include "Player.h"
#define TELE nsNpcTel::CatDest
#define PAGE nsNpcTel::Page
#define PAGEI PAGE::Instance
nsNpcTel::VCatDest nsNpcTel::TabCatDest;
uint32 PAGE::operator [] (Player * const player) const
{
for (VInst_t i(0); i < m_TabInstance.size(); ++i)
{
if (m_TabInstance[i].GetPlayer() == player)
return m_TabInstance[i].GetPageId();
}
return 0;
}
PAGE::Instance & PAGE::operator () (Player * const player)
{
for (VInst_t i(0); i < m_TabInstance.size(); ++i)
{
if (m_TabInstance[i].GetPlayer() == player)
return m_TabInstance[i];
}
m_TabInstance.push_back(Instance(player));
return m_TabInstance.back();
}
PAGE::Instance & PAGEI::operator = (const uint32 &id)
{
m_PageId = id;
return *this;
}
PAGE::Instance & PAGEI::operator ++ (void)
{
++m_PageId;
return *this;
}
PAGE::Instance PAGEI::operator ++ (int32)
{
Instance tmp (*this);
++m_PageId;
return tmp;
}
PAGE::Instance & PAGEI::operator -- (void)
{
--m_PageId;
return *this;
}
PAGE::Instance PAGEI::operator -- (int32)
{
Instance tmp (*this);
--m_PageId;
return tmp;
}
TELE::CatDest(const uint32 &id, const std::string &name,
const Flag &flag, const uint64 &data0, const uint32 &data1)
: m_id(id), m_name(name), m_flag(flag), m_data0(data0), m_data1(data1)
{
m_TabDest.clear();
}
std::string TELE::GetName(const bool IsGM /* = false */) const
{
if (!IsGM || m_flag != FLAG_TEAM)
return m_name;
switch (m_data0)
{
case TELEPORT_TEAM_HORDE: return std::string(m_name + " (H)");
case TELEPORT_TEAM_ALLIANCE: return std::string(m_name + " (A)");
}
return m_name;
}
bool TELE::IsAllowedToTeleport(Player * const player) const
{
if (player->IsGameMaster())
{
if (m_flag == FLAG_GMLEVEL)
return player->GetSession()->GetSecurity() >= m_data0;
return true;
}
switch (m_flag)
{
case FLAG_TEAM:
switch (m_data0)
{
case TELEPORT_TEAM_HORDE: return player->GetTeamId() == TEAM_HORDE;
case TELEPORT_TEAM_ALLIANCE: return player->GetTeamId() == TEAM_ALLIANCE;
case TELEPORT_TEAM_ALL: return true;
}
case FLAG_GUILD:
return player->GetGuildId() == m_data0;
case FLAG_GMLEVEL:
return player->GetSession()->GetSecurity() >= m_data0;
case FLAG_ISGM:
return player->IsGameMaster();
case FLAG_ACCOUNT:
return player->GetSession()->GetAccountId() == m_data0;
case FLAG_LEVEL:
return player->getLevel() >= m_data0;
case FLAG_ITEM:
return player->HasItemCount(m_data0, m_data1, true);
case FLAG_QUEST:
if (m_data1 < MAX_QUEST_STATUS)
return player->GetQuestStatus(m_data0) == m_data1;
return player->GetQuestRewardStatus(m_data0);
case FLAG_GENDER:
return player->getGender() == m_data0;
case FLAG_RACE:
return player->getRace() == m_data0;
case FLAG_CLASS:
return player->getClass() == m_data0;
case FLAG_REPUTATION:
return player->GetReputationRank(m_data0) >= int32(m_data1);
case FLAG_PLAYER:
return player->GetGUID().GetCounter() == m_data0;
default:
return true;
}
sLog->outDebug(LOG_FILTER_TSCR, "Invalid flag (category: %u). Important problem...", GetCatID());
return false;
}
uint32 TELE::CountOfCategoryAllowedBy(Player * const player)
{
uint32 count (0);
for (VCatDest_t i(0); i < TabCatDest.size(); ++i)
{
if (TabCatDest[i].IsAllowedToTeleport(player))
++count;
}
return count;
}
bool nsNpcTel::IsValidData(const uint32 &cat, const Flag &flag,
const uint64 &data0, const uint32 &data1)
{
switch(flag)
{
case FLAG_TEAM:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (data0 < MAX_FLAG_TEAM)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (Team) (category: %u).", cat);
return false;
case FLAG_GUILD:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (data0)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (GuildID) (category: %u).", cat);
return false;
case FLAG_GMLEVEL:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (0 < data0 && data0 < 256)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (GmLevel) (category: %u).", cat);
return false;
case FLAG_ISGM:
if (data0)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (category: %u).", cat);
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
return true;
case FLAG_ACCOUNT:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (data0)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (AccountID) (category: %u).", cat);
return false;
case FLAG_LEVEL:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (0 < data0 && data0 < 256)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (Level) (category: %u).", cat);
return false;
case FLAG_ITEM:
if (!data0)
{
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (ItemID) (category: %u).", cat);
return false;
}
if (data1)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (Item Count) (category: %u).", cat);
return false;
case FLAG_QUEST:
if (!data0)
{
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (QuestID) (category: %u).", cat);
return false;
}
if (data1 < MAX_QUEST_STATUS + 1)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (Quest Status) (category: %u).", cat);
return false;
case FLAG_GENDER:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (data0 < GENDER_NONE)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (Gender) (category: %u).", cat);
return false;
case FLAG_RACE:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (0 < data0 && data0 < MAX_RACES)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (Race) (category: %u).", cat);
return false;
case FLAG_CLASS:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (0 < data0 && data0 < MAX_CLASSES)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (Class) (category: %u).", cat);
return false;
case FLAG_REPUTATION:
if (!data0)
{
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (Faction/Reputation) (category: %u).", cat);
return false;
}
if (data1 <= REP_EXALTED)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (Faction/Reputation) (category: %u).", cat);
return false;
case FLAG_PLAYER:
if (data1)
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data1 (category: %u).", cat);
if (data0)
return true;
sLog->outDebug(LOG_FILTER_TSCR, "Invalid data0 (PlayerGuid) (category: %u).", cat);
return false;
default:
return false;
}
//sLog->outDebug(LOG_FILTER_TSCR, "Invalid flag (category: %u).", cat);
return false;
}
void nsNpcTel::LoadNpcTele()
{
const char *Table[] =
{
"custom_npc_tele_category",
"custom_npc_tele_destination",
"custom_npc_tele_association",
};
QueryResult result = WorldDatabase.PQuery(
"SELECT `flag`, `data0`, `data1`, `cat_id`, C.`name` `namecat`, D.`name` `namedest`, "
// 0 1 2 3 4 5
"`pos_X`, `pos_Y`, `pos_Z`, `orientation`, `map`, `level`, `cost` "
// 6 7 8 9 10 11 12
"FROM `%s` C, `%s` D, `%s` A "
"WHERE C.`id` = `cat_id` AND D.`id` = `dest_id` "
"ORDER BY `namecat`, `cat_id`, `namedest`", Table[0], Table[1], Table[2]);
nsNpcTel::TabCatDest.clear();
if (result)
{
//sLog->outString( "TSCR: Loading %s, %s and %s...", Table[0], Table[1], Table[2]);
uint32 catid = 0;
uint32 nbDest = 0;
bool IsValidCat = true;
bool FirstTime = true;
do
{
Field *fields = result->Fetch();
if (!IsValidCat && catid == fields[3].GetUInt32() && !FirstTime)
continue;
IsValidCat = true;
FirstTime = false;
if (!nsNpcTel::IsValidData(fields[3].GetUInt32(), (nsNpcTel::Flag)fields[0].GetUInt8(),
fields[1].GetUInt64(), fields[2].GetUInt32()))
{
IsValidCat = false;
catid = fields[3].GetUInt32();
continue;
}
if (catid != fields[3].GetUInt32())
{
catid = fields[3].GetUInt32();
nsNpcTel::CatDest categorie (catid, fields[4].GetString(), (nsNpcTel::Flag)fields[0].GetUInt8(),
fields[1].GetUInt64(), fields[2].GetUInt32());
nsNpcTel::TabCatDest.push_back(categorie);
}
nsNpcTel::Dest item =
{
fields[5].GetString(), // Name
fields[6].GetFloat(), // X
fields[7].GetFloat(), // Y
fields[8].GetFloat(), // Z
fields[9].GetFloat(), // Orientation
fields[10].GetUInt16(), // Map
fields[11].GetUInt8(), // Level
fields[12].GetUInt32(), // Cost
};
nsNpcTel::TabCatDest.back().AddDest(item);
++nbDest;
} while (result->NextRow());
// sLog->outString("");
// sLog->outString("TSCR: >> Loaded %u npc_teleport.", nbDest);
}
//else sLog->outString("TSCR: WARNING >> Loaded 0 npc_teleport.");
}
#undef TELE
#undef PAGE
#undef PAGEI

150
src/GuildHouse/Teleport.h Normal file
View File

@@ -0,0 +1,150 @@
/**
*
* @File : sc_npc_teleport.h
*
* @Authors : Wilibald09
*
* @Date : 19/08/2008
*
* @Version : 1.2
*
**/
#ifndef TELEPORT_H
#define TELEPORT_H
#include "Common.h"
#include <vector>
class Player;
namespace nsNpcTel
{
// Different types of permissions
enum Flag
{
FLAG_TEAM = 0,
FLAG_GUILD = 1,
FLAG_GMLEVEL = 2,
FLAG_ISGM = 3,
FLAG_ACCOUNT = 4,
FLAG_LEVEL = 5,
FLAG_ITEM = 6,
FLAG_QUEST = 7,
FLAG_GENDER = 8,
FLAG_RACE = 9,
FLAG_CLASS = 10,
FLAG_REPUTATION = 11,
FLAG_PLAYER = 12,
MAX_FLAG,
};
// Different parameters of FLAG_TEAM
enum
{
TELEPORT_TEAM_ALL = 0,
TELEPORT_TEAM_ALLIANCE = 1,
TELEPORT_TEAM_HORDE = 2,
MAX_FLAG_TEAM,
};
// Structure representing the destinations
struct Dest
{
std::string m_name;
float m_X, m_Y, m_Z, m_orient;
uint16 m_map;
uint8 m_level;
uint32 m_cost;
};
// Class representing the categories of destinations
class CatDest
{
public:
typedef std::vector<Dest> VDest;
typedef VDest::size_type VDest_t;
CatDest(const uint32 &id, const std::string &name,
const Flag &flag, const uint64 &data0, const uint32 &data1);
void AddDest (const Dest &item) { m_TabDest.push_back(item); }
Dest GetDest (const uint32 &id) const { return m_TabDest[id]; }
uint32 GetCatID (void) const { return m_id; }
uint32 size (void) const { return m_TabDest.size(); }
std::string GetName(const bool IsGM = false) const;
bool IsAllowedToTeleport(Player * const player) const;
static uint32 CountOfCategoryAllowedBy(Player * const player);
private:
uint32 m_id;
std::string m_name;
Flag m_flag;
uint64 m_data0;
uint32 m_data1;
VDest m_TabDest;
};
// Class page for current player
class Page
{
protected:
// Class instance for current player
class Instance
{
public:
Instance(Player * const player, const uint32 &PageId = 0)
: m_player(player), m_PageId(PageId) {}
Instance & operator = (const uint32 &id);
Instance & operator ++ (void);
Instance operator ++ (int32);
Instance & operator -- (void);
Instance operator -- (int32);
uint32 GetPageId(void) const { return m_PageId; }
Player * GetPlayer(void) const { return m_player; }
private:
Player *m_player;
uint32 m_PageId;
};
public:
typedef std::vector<Instance> VInst;
typedef VInst::size_type VInst_t;
Page(void) { m_TabInstance.clear(); }
Instance & operator () (Player * const player);
uint32 operator [] (Player * const player) const;
private:
VInst m_TabInstance;
};
typedef std::vector <CatDest> VCatDest;
typedef VCatDest::size_type VCatDest_t;
// Verification of data integrity
bool IsValidData(const uint32 &cat, const Flag &flag,
const uint64 &data0, const uint32 &data1);
extern VCatDest TabCatDest;
// Loading contents of database
void LoadNpcTele();
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,146 @@
#include "AzthPlayer.h"
#include "Player.h"
#include "Group.h"
#include "azth_custom_hearthstone_mode.h"
#include "AzthUtils.h"
// Send a kill credit, skipping the normal checks on raid group.
void AzthPlayer::ForceKilledMonsterCredit(uint32 entry, uint64 guid) {
uint16 addkillcount = 1;
uint32 real_entry = entry;
ObjectGuid _guid = ObjectGuid(guid);
if (guid) {
Creature* killed = player->GetMap()->GetCreature(_guid);
if (killed && killed->GetEntry())
real_entry = killed->GetEntry();
}
player->StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_CREATURE,
real_entry); // MUST BE CALLED FIRST
player->UpdateAchievementCriteria(
ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, real_entry, addkillcount,
guid ? player->GetMap()->GetCreature(_guid) : NULL);
for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i) {
uint32 questid = player->GetQuestSlotQuestId(i);
if (!questid)
continue;
Quest const* qInfo = sObjectMgr->GetQuestTemplate(questid);
if (!qInfo)
continue;
QuestStatusMap::const_iterator _itr = player->getQuestStatusMap().find(questid);
if (_itr == player->getQuestStatusMap().end())
continue;
QuestStatusData q_status = _itr->second;
if (q_status.Status == QUEST_STATUS_INCOMPLETE && (qInfo->IsPVPQuest() && (!player->GetGroup() || (player->GetGroup()->isBFGroup() || player->GetGroup()->isBGGroup()))))
{
if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL) /*&& !qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_CAST)*/)
{
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
{
// skip GO activate objective or none
if (qInfo->RequiredNpcOrGo[j] <= 0)
continue;
uint32 reqkill = qInfo->RequiredNpcOrGo[j];
if (reqkill == real_entry)
{
uint32 reqkillcount = qInfo->RequiredNpcOrGoCount[j];
uint16 curkillcount = q_status.CreatureOrGOCount[j];
if (curkillcount < reqkillcount)
{
q_status.CreatureOrGOCount[j] = curkillcount + addkillcount;
QuestStatusSaveMap::iterator __itr = player->GetQuestStatusSaveMap().find(questid);
if (__itr == player->GetQuestStatusSaveMap().end())
continue;
__itr->second = true;
//player->m_QuestStatusSave[questid] = true;
player->SendQuestUpdateAddCreatureOrGo(
qInfo, _guid, j, curkillcount, addkillcount);
}
if (player->CanCompleteQuest(questid))
player->CompleteQuest(questid);
else
player->AdditionalSavingAddMask(ADDITIONAL_SAVING_QUEST_STATUS);
// same objective target can be in many active quests, but not in 2
// objectives for single quest (code optimization).
break;
}
}
}
}
}
}
bool AzthPlayer::passHsChecks(Quest const* qInfo, uint32 entry, uint32& realEntry, ObjectGuid /*guid*/) {
uint32 qId = qInfo->GetQuestId();
uint32 currentDimension = getCurrentDimensionByAura();
HearthstoneQuest* hsQuest = sHearthstoneMode->getHeartstoneQuestInfo(qId);
// if no data present in hearthstone table
// then use normal behaviour
if (!hsQuest) {
// Do not allow official quest completition in empty/custom dimensions
if (sAzthUtils->isPhasedDimension(currentDimension))
return false;
return true; // pass the check if no Hs quest exists
}
if (hsQuest->reqDimension > 0 && hsQuest->reqDimension != currentDimension)
return false;
// positive value: return false if groupsize is higher than groupLimit
// negative value: return false if groupsize is lower than groupLimit
if ((hsQuest->groupLimit > 0 && this->getGroupSize() > uint8(hsQuest->groupLimit))
|| (hsQuest->groupLimit < 0 && this->getGroupSize() < uint8(abs(hsQuest->groupLimit))))
return false;
/*
* check for quests that require timewalking
*/
// normal timewalking
if (hsQuest->specialLevel > 0) {
//special timewalking
uint32 groupLevel = this->getGroupLevel(false);
uint32 specialLevel = groupLevel > 0 ? groupLevel : GetTimeWalkingLevel();
if (specialLevel == hsQuest->specialLevel || sAzthUtils->isMythicCompLvl(hsQuest->specialLevel, specialLevel)) {
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) {
if (qInfo->RequiredNpcOrGo[j] > 0 && uint32(qInfo->RequiredNpcOrGo[j]) == entry)
realEntry = entry;
}
return true;
}
}
else if (qInfo->GetQuestLevel() <= 80) {
uint32 groupLevel = this->getGroupLevel();
uint32 level = groupLevel > 0 ? groupLevel : this->player->getLevel();
if (level >= qInfo->GetMinLevel() && qInfo->GetQuestLevel() > 0 && level <= uint32(qInfo->GetQuestLevel())) {
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) {
if (qInfo->RequiredNpcOrGo[j] > 0 && uint32(qInfo->RequiredNpcOrGo[j]) == entry)
realEntry = entry;
}
return true;
}
}
// in this case conditions above are negative
// so check has not passed
return false;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
#ifndef HEARTHSTONE_MODE_H
#define HEARTHSTONE_MODE_H
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Player.h"
#include "WorldSession.h"
#include "WorldPacket.h"
#include "Chat.h"
#include "Spell.h"
#include "Define.h"
#include "GossipDef.h"
#include "Item.h"
#include "Common.h"
#include "Opcodes.h"
#include "Log.h"
#include "ObjectMgr.h"
#include <vector> // std::vector
struct HearthstoneAchievement
{
uint32 data0;
uint32 data1;
uint32 creature;
uint32 type;
};
struct HearthstoneQuest
{
uint32 id;
uint32 flag;
uint32 specialLevel;
uint32 reqDimension;
int32 groupLimit;
uint32 startTime;
uint32 endTime;
};
struct HearthstoneVendor
{
uint32 id;
int32 reputationId;
int32 repValue;
uint32 gossipOk;
uint32 gossipNope;
bool pvpVendor;
};
enum bitmasksHs
{
BITMASK_NORMAL = 0, //normal quests but with hs checks
BITMASK_DAILY_RANDOM = 1, //hs daily random
BITMASK_PVP = 2, //hs daily random
BITMASK_WEEKLY_RND1 = 4, //hs weekly random
BITMASK_TW_WEEKLY = 8, //hs TW weekly
BITMASK_TW_DAILY = 16, //hs TW daily
BITMASK_TW_DAILY_RANDOM = 32, //hs TW daily random
BITMASK_WEEKLY_RND2 = 64, //hs weekly random
BITMASK_WEEKLY_RND3 = 128, //hs wotlk weekly random
BITMASK_TW_WEEKLY_RANDOM = 256, //hs tw weekly random
};
enum miscHs
{
PVE_QUEST_NUMBER = 1,
MAX_PVE_QUEST_NUMBER = 0,
PVP_QUEST_NUMBER = 1,
MAX_PVP_QUEST_NUMBER = 3,
WEEKLY_QUEST_NUMBER = 0,
MAX_WEEKLY_QUEST_NUMBER = 3,
AZTH_REPUTATION_ID = 948
};
enum otherMiscHs
{
QUALITY_TO_FILL_PERCENTAGE = 1, // if percentage "explode", then use quality 1
ONLY_COMMON = 2, // number of common item (grey, white)
NOT_COMMON = 1, // number of rare items
EVERYTHING = 2, // number of items of any quality
TIME_TO_RECEIVE_MAIL = 0,
SUPPORTED_CRITERIA_NUMBER = 15,
MAX_RETRY_GET_ITEM = 30
};
class HearthstoneMode
{
public:
static HearthstoneMode* instance();
void AzthSendListInventory(ObjectGuid vendorGuid, WorldSession * session, uint32 extendedCostStartValue);
void sendQuestCredit(Player *player, AchievementCriteriaEntry const* criteria, std::vector<uint32>& hsCheckList);
int returnData0(AchievementCriteriaEntry const* criteria);
int returnData1(AchievementCriteriaEntry const* criteria);
std::vector<HearthstoneAchievement> hsAchievementTable;
std::unordered_map<uint32, HearthstoneQuest> allQuests;
std::unordered_map<uint32, HearthstoneQuest> hsPveQuests;
std::unordered_map<uint32, HearthstoneQuest> hsPvpQuests;
std::unordered_map<uint32, HearthstoneQuest> hsWeeklyClassicQuests;
std::unordered_map<uint32, HearthstoneQuest> hsWeeklyTBCQuests;
std::unordered_map<uint32, HearthstoneQuest> hsWeeklyWotlkQuests;
std::unordered_map<uint32, HearthstoneQuest> hsTwWeeklyRandomQuests;
std::unordered_map<uint32, HearthstoneQuest> hsTwWeeklyQuests;
std::unordered_map<uint32, HearthstoneQuest> hsTwDailyQuests;
std::unordered_map<uint32, HearthstoneQuest> hsTwDailyRandomQuests;
int getQuality();
std::vector<int> items[8];
bool isInArray(int val);
bool PlayerCanUseItem(Item const* item, Player* player, bool classCheck);
void loadHearthstone();
std::vector<HearthstoneVendor> hsVendors;
HearthstoneQuest *getHeartstoneQuestInfo(uint64 id);
private:
float CHANCES[8] = { 10.f, 30.f, 20.f, 15.f, 5.f, 1.f, 0.5f, 1.f };
};
#define sHearthstoneMode HearthstoneMode::instance()
#endif // !HEARTHSTONE_MODE

View File

@@ -0,0 +1,114 @@
#include "AzthAchievement.h"
AzthAchievementMgr* AzthAchievementMgr::instance()
{
static AzthAchievementMgr instance;
return &instance;
}
AzthAchievement::AzthAchievement(uint32 achievement, uint32 criteria, uint32 points, uint32 category, uint32 parentCategory, uint32 difficulty, uint32 levelMax, uint32 levelMin,
uint32 level, uint32 originalPoints, std::string name, std::string description, uint32 reward, uint32 rewardCount, uint32 killCredit, uint32 specialLevelReq, uint32 reqDimension)
{
this->achievement = achievement;
this->criteria = criteria;
this->points = points;
this->category = category;
this->parentCategory = parentCategory;
this->difficulty = difficulty;
this->levelMax = levelMax;
this->levelMin = levelMin;
this->level = level;
this->originalPoints = originalPoints;
this->name = name;
this->description = description;
this->reward = reward;
this->rewardCount = rewardCount;
this->killCredit = killCredit;
this->specialLevelReq = specialLevelReq;
this->reqDimension = reqDimension;
}
uint32 AzthAchievement::GetAchievement() const
{
return achievement;
}
uint32 AzthAchievement::GetCriteria() const
{
return criteria;
}
uint32 AzthAchievement::GetPoints() const
{
return points;
}
uint32 AzthAchievement::GetCategory() const
{
return category;
}
uint32 AzthAchievement::GetParCategory() const
{
return parentCategory;
}
uint32 AzthAchievement::GetDifficulty() const
{
return difficulty;
}
uint32 AzthAchievement::GetLevelMax() const
{
return levelMax;
}
uint32 AzthAchievement::GetLevelMin() const
{
return levelMin;
}
uint32 AzthAchievement::GetLevel() const
{
return level;
}
uint32 AzthAchievement::GetOriginalPoints() const
{
return originalPoints;
}
std::string AzthAchievement::GetName() const
{
return name;
}
std::string AzthAchievement::GetDescription() const
{
return description;
}
uint32 AzthAchievement::GetReward() const
{
return reward;
}
uint32 AzthAchievement::GetRewardCount() const
{
return rewardCount;
}
uint32 AzthAchievement::GetKillCredit() const
{
return killCredit;
}
uint32 AzthAchievement::GetSpecialLevelReq() const
{
return specialLevelReq;
}
uint32 AzthAchievement::GetReqDimension() const
{
return reqDimension;
}

View File

@@ -0,0 +1,65 @@
#ifndef AZTH_ACHIEVEMENT_H
#define AZTH_ACHIEVEMENT_H
#include "Common.h"
#include "Define.h"
#include "Config.h"
#include <map>
class AzthAchievement
{
public:
//GETTERS
uint32 GetAchievement() const;
uint32 GetCriteria() const;
uint32 GetPoints() const;
uint32 GetCategory() const;
uint32 GetParCategory() const;
uint32 GetDifficulty() const;
uint32 GetLevelMax() const;
uint32 GetLevelMin() const;
uint32 GetLevel() const;
uint32 GetOriginalPoints() const;
std::string GetName() const;
std::string GetDescription() const;
uint32 GetReward() const;
uint32 GetRewardCount() const;
uint32 GetKillCredit() const;
uint32 GetSpecialLevelReq() const;
uint32 GetReqDimension() const;
AzthAchievement(uint32 achievement = 0, uint32 criteria = 0, uint32 points = 0, uint32 category = 0, uint32 parentCategory = 0, uint32 difficulty = 0, uint32 levelMax = 0,
uint32 levelMin = 0, uint32 level = 0, uint32 originalPoints = 0, std::string name = "", std::string description = "", uint32 reward = 0, uint32 rewardCount = 0, uint32 killCredit = 0,
uint32 specialLevelReq = 0, uint32 reqDimension = 0);
private:
uint32 achievement;
uint32 criteria;
uint32 points;
uint32 category;
uint32 parentCategory;
uint32 difficulty;
uint32 levelMax;
uint32 levelMin;
uint32 level;
uint32 originalPoints;
std::string name;
std::string description;
uint32 reward;
uint32 rewardCount;
uint32 killCredit;
uint32 specialLevelReq;
uint32 reqDimension;
};
class AzthAchievementMgr {
public:
static AzthAchievementMgr* instance();
std::map<uint32, AzthAchievement> achievementList;
};
#define sAzthAchievementMgr AzthAchievementMgr::instance()
#endif

View File

@@ -0,0 +1,34 @@
#include "AzthGroupMgr.h"
#include "DatabaseEnv.h"
AzthGroupMgr::AzthGroupMgr(Group* original)
{
group = original;
QueryResult result = CharacterDatabase.PQuery("SELECT `MaxlevelGroup`, `MaxGroupSize` FROM `azth_groups` WHERE `guid` = '%u'", group->GetGUID().GetCounter());
if (!result)
{
levelMaxGroup = 0;
groupSize = 1;
}
else
{
Field* fields = result->Fetch();
levelMaxGroup = fields[0].GetUInt32();
groupSize = fields[1].GetUInt32();
}
}
AzthGroupMgr::~AzthGroupMgr()
{
}
void AzthGroupMgr::saveToDb()
{
ASSERT(group);
CharacterDatabase.PExecute("UPDATE azth_groups SET MaxLevelGroup = %u, MaxGroupSize = %u WHERE leaderGuid = %u", levelMaxGroup, groupSize, this->group->GetLeaderGUID().GetCounter());
}

View File

@@ -0,0 +1,18 @@
#ifndef AZTHGROUPMGR_H
#define AZTHGROUPMGR_H
#include "Group.h"
class AzthGroupMgr
{
public:
explicit AzthGroupMgr(Group* original);
~AzthGroupMgr();
void saveToDb();
uint32 levelMaxGroup;
uint32 groupSize;
Group* group;
};
#endif

View File

@@ -0,0 +1,25 @@
#include "AzthInstanceMgr.h"
#include "Log.h"
#include <boost/stacktrace.hpp>
AzthInstanceMgr::AzthInstanceMgr(InstanceSave* is)
{
levelMax = 0;
groupSize = 1;
startTime = static_cast<uint32>(time(nullptr));
instanceSave = is;
}
void AzthInstanceMgr::saveToDb()
{
if(!instanceSave)
{
// instanceSave is a variable that is initializated when an instance is created and cannot be null
// if it happens we are loosing important data and it's prone to abuses
LOG_FATAL("azth.AzthInstanceMgr","saveToDb() cannot have null instanceSave, stacktrace: %s", boost::stacktrace::to_string(boost::stacktrace::basic_stacktrace()).c_str());
return;
}
CharacterDatabase.PExecute("UPDATE instance SET levelPg = %u, groupSize = %u, startTime = %u WHERE id = %u", levelMax, groupSize, instanceSave->GetInstanceId(), startTime);
}

View File

@@ -0,0 +1,21 @@
#ifndef AZTHINSTANCEMGR_H
#define AZTHINSTANCEMGR_H
#include "InstanceSaveMgr.h"
class InstanceSave;
class AzthInstanceMgr
{
public:
explicit AzthInstanceMgr(InstanceSave* is);
~AzthInstanceMgr();
void saveToDb();
InstanceSave* instanceSave;
uint32 levelMax;
uint32 groupSize;
uint32 startTime;
};
#endif

View File

@@ -0,0 +1,107 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "InstanceSaveMgr.h"
#include "Player.h"
#include "Map.h"
#include "WorldSession.h"
#include "Group.h"
#include "AzthUtils.h"
#include "AZTH.h"
enum achievementStatsType
{
ACHIEVEMENT_TYPE,
CRITERIA_TYPE
};
class AzthGroupPlg : public GroupScript {
public:
AzthGroupPlg() : GroupScript("AzthGroupPlg") {
}
void OnAddMember(Group* group, ObjectGuid guid) override {
Player* player = ObjectAccessor::FindPlayer(guid);
sAzthUtils->updateTwLevel(player, group);
}
};
class PlayerStats : public PlayerScript
{
public:
PlayerStats() : PlayerScript("PlayerStats") {
}
void OnUpdateZone(Player* /*player*/, uint32 /*newZone*/, uint32 /*newArea*/) override {
// sAzthUtils->updateTwLevel(player, player->GetGroup()); <-- we will do it in TimeWalking.cpp script, having correct order with autoscaling
}
// Following 2 functions store levels in a temporary map
void OnAchiComplete(Player *player, AchievementEntry const* achievement) override {
AzthPlayer::AzthAchiData it = {
player->getLevel(),
sAZTH->GetAZTHPlayer(player)->getGroupLevel(),
sAZTH->GetAZTHPlayer(player)->getPStatsLevel(false)
};
sAZTH->GetAZTHPlayer(player)->m_completed_achievement_map[achievement->ID] = it;
}
void OnCriteriaProgress(Player *player, AchievementCriteriaEntry const* criteria) override {
AzthPlayer::AzthAchiData it = {
player->getLevel(),
sAZTH->GetAZTHPlayer(player)->getGroupLevel(),
sAZTH->GetAZTHPlayer(player)->getPStatsLevel(false)
};
sAZTH->GetAZTHPlayer(player)->m_completed_criteria_map[criteria->ID] = it;
}
// Following 2 functions save our temporary maps inside the db
void OnAchiSave(CharacterDatabaseTransaction /* trans */, Player *player, uint16 achId, CompletedAchievementData achiData) override {
if (sAZTH->GetAZTHPlayer(player)->m_completed_achievement_map.find(achId) != sAZTH->GetAZTHPlayer(player)->m_completed_achievement_map.end()) {
AzthPlayer::AzthAchiData it = sAZTH->GetAZTHPlayer(player)->m_completed_achievement_map[achId];
CharacterDatabase.AsyncQuery(Acore::StringFormat("INSERT INTO azth_achievement_stats (playerGuid, achievement, type, level, levelParty, specialLevel, date) VALUES (%u, %u, %u, %u, %u, %u, %u)",
player->GetGUID().GetCounter(),
achId,
ACHIEVEMENT_TYPE,
it.level,
it.levelParty,
it.specialLevel,
achiData.date
).c_str());
sAZTH->GetAZTHPlayer(player)->m_completed_achievement_map.erase(achId);
}
}
void OnCriteriaSave(CharacterDatabaseTransaction /* trans */, Player* player, uint16 critId, CriteriaProgress criteriaData) override {
if (sAZTH->GetAZTHPlayer(player)->m_completed_criteria_map.find(critId) != sAZTH->GetAZTHPlayer(player)->m_completed_criteria_map.end()) {
AzthPlayer::AzthAchiData it = sAZTH->GetAZTHPlayer(player)->m_completed_criteria_map[critId];
CharacterDatabase.AsyncQuery(Acore::StringFormat("INSERT INTO azth_achievement_stats (playerGuid, achievement, type, level, levelParty, specialLevel, date) VALUES (%u, %u, %u, %u, %u, %u, %u)",
player->GetGUID().GetCounter(),
critId,
CRITERIA_TYPE,
it.level,
it.levelParty,
it.specialLevel,
criteriaData.date
).c_str());
sAZTH->GetAZTHPlayer(player)->m_completed_criteria_map.erase(critId);
}
}
};
void AddSC_playerstats() {
new AzthGroupPlg();
new PlayerStats();
}

View File

@@ -0,0 +1,164 @@
#include "AzthPlayer.h"
#include "AzthLevelStat.h"
#include "Group.h"
#include "Player.h"
#include "AZTH.h"
#include "AzthGroupMgr.h"
uint32 AzthPlayer::normalizeLvl(uint32 level)
{
if (level>=TIMEWALKING_SPECIAL_LVL_WOTLK_START && level<=TIMEWALKING_SPECIAL_LVL_WOTLK_END)
return sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
if (!player)
return level;
uint32 rLevel = level;
// to normalize level auto or vas we need to get the max level of the group or the level of player
// however since the special level is related to a dynamic real level (that can be increased/decreased)
// we need to get the max level in a specific time (for now, should be avoided when possible)
if (level >= TIMEWALKING_SPECIAL_LVL_MIN)
{
Group *group = player->GetGroup();
if (group)
{
for (Group::member_citerator mitr = group->GetMemberSlots().begin(); mitr != group->GetMemberSlots().end(); ++mitr)
{
if (CharacterCacheEntry const* gpd = sCharacterCache->GetCharacterCacheByGuid(mitr->guid))
{
if (groupLevel < gpd->Level)
rLevel = gpd->Level;
}
}
}
else
rLevel = player->getLevel();
}
return rLevel;
}
uint32 AzthPlayer::getGroupLevel(bool normalize /*=true*/, bool checkInstance /*=true*/) {
if (!player)
return 0;
uint32 groupLevel = 0;
if (checkInstance) {
groupLevel = getInstanceLevel(normalize);
}
Group *group = player->GetGroup();
if (AzthGroupMgr *azthGroup = sAZTH->GetAZTHGroup(group); azthGroup)
{
if (!azthGroup)
{
return 0;
}
// outworld party or limit case for dungeon
groupLevel = azthGroup->levelMaxGroup;
if (normalize)
groupLevel = normalizeLvl(groupLevel);
}
return groupLevel;
}
uint32 AzthPlayer::getInstanceLevel(bool normalize /*=true*/)
{
if (!player)
return 0;
uint32 instanceLevel=0;
Map *map = player->FindMap();
if (map && (map->IsDungeon() || map->IsRaid()))
{
// when in instance
InstanceSave *is = sInstanceSaveMgr->PlayerGetInstanceSave(
player->GetGUID(), map->GetId(),player->GetDifficulty((map->IsRaid())));
if (is && sAZTH->GetAZTHInstanceSave(is))
{
instanceLevel = sAZTH->GetAZTHInstanceSave(is)->levelMax;
if (normalize)
instanceLevel = normalizeLvl(instanceLevel);
}
}
return instanceLevel;
}
// this function help to find the current level for player stats and timewalking
// in order of importance: instance -> group -> player
// but you can disable instance or group check or both in special situations
uint32 AzthPlayer::getPStatsLevel(bool normalize /*=true*/, bool checkInstance /*=true*/, bool checkGroup /*=true*/)
{
if (!player)
return 0;
uint32 level = 0;
// instance
if (checkInstance)
level = getInstanceLevel(normalize);
// group
if (checkGroup && !level)
level = getGroupLevel(normalize);
// player
if (!level)
{
level = isTimeWalking() ? GetTimeWalkingLevel() : player->getLevel();
if (normalize)
level = normalizeLvl(level);
}
return level;
}
uint32 AzthPlayer::getGroupSize(bool checkInstance /*=true*/)
{
if (!player)
return 0;
uint32 groupSize = 0;
if (checkInstance)
groupSize = getInstanceSize();
if (!groupSize)
{
Group *group = player->GetGroup();
AzthGroupMgr *azthGroup = sAZTH->GetAZTHGroup(group);
if (azthGroup)
groupSize = azthGroup->groupSize; // outworld party or limit case for dungeon
}
return groupSize;
}
uint32 AzthPlayer::getInstanceSize()
{
if (!player)
return 0;
Map *map = player->FindMap();
if (map && (map->IsDungeon() || map->IsRaid()))
{
// caso party instance
InstanceSave *is = sInstanceSaveMgr->PlayerGetInstanceSave(player->GetGUID(), map->GetId(), player->GetDifficulty((map->IsRaid())));
if (is)
return sAZTH->GetAZTHInstanceSave(is)->groupSize;
}
return 0;
}

View File

@@ -0,0 +1,104 @@
#include "ArenaSeason.h"
#include "AzthUtils.h"
#include "AZTH.h"
#include "Solo3v3.h"
Season* Season::instance()
{
static Season instance;
return &instance;
}
Season::Season()
{
itemLevel = uint32(0);
startingDate = time_t(0);
endDate = time_t(0);
}
Season::Season(uint32 ItsItemLevel, time_t ItsStartingDate, time_t ItsEndDate)
{
itemLevel = ItsItemLevel;
startingDate = ItsStartingDate;
endDate = ItsEndDate;
}
uint32 Season::GetItemLevel() const
{
return itemLevel;
}
void Season::SetItemLevel(uint32 ItsItemLevel)
{
itemLevel = ItsItemLevel;
}
time_t Season::GetStartingDate() const
{
return startingDate;
}
void Season::SetStartingDate(time_t ItsStartingDate)
{
startingDate = ItsStartingDate;
}
time_t Season::GetEndDate() const
{
return endDate;
}
void Season::SetEndDate(time_t ItsEndDate)
{
endDate = ItsEndDate;
}
bool Season::IsEnabled() const
{
return enabled;
}
void Season::SetEnabled(bool enable)
{
this->enabled = enable;
}
//
// Passing player argument will check the player state and automatically shows a message
//
bool Season::checkItem(ItemTemplate const* proto, Player const* player)
{
if (!IsEnabled())
return true; //SYSTEM DISABLED
if (/*player->InBattleground() ||*/ player->InArena() || /*player->InBattlegroundQueue()*/
player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_2v2) ||
player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_3v3) ||
player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_5v5) ||
player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_3v3_SOLO) ||
player->InBattlegroundQueueForBattlegroundQueueType((BattlegroundQueueTypeId)BATTLEGROUND_QUEUE_1v1)
)
{
if (!sAzthUtils->checkItemLvL(proto, GetItemLevel()))
{
ChatHandler(player->GetSession()).SendSysMessage(sAzthLang->getf(AZTH_LANG_TOURNAMENT_LEVEL_TOOHIGH, player, proto->ItemId, proto->Name1.c_str()));
return false;
}
}
return true;
}
bool Season::canJoinArenaOrBg(Player *pl)
{
if (!IsEnabled())
return true; // SYSTEM DISABLED
if (sAZTH->GetAZTHPlayer(pl)->checkItems(GetItemLevel()))
return true;
ChatHandler(pl->GetSession()).SendSysMessage(sAzthLang->getf(AZTH_LANG_TOURNAMENT_LEVEL_ACTUAL, pl, sASeasonMgr->GetItemLevel()));
return false;
}

View File

@@ -0,0 +1,41 @@
#include "Common.h"
#include "Define.h"
#include "Config.h"
#include "ItemTemplate.h"
#include "Player.h"
class Season
{
public:
static Season* instance();
//GETTERS
uint32 GetItemLevel() const;
time_t GetStartingDate() const;
time_t GetEndDate() const;
bool IsEnabled() const;
//SETTERS
void SetItemLevel(uint32 itemLevel);
void SetStartingDate(time_t startingDate);
void SetEndDate(time_t endDate);
void SetEnabled(bool enable);
bool checkItem(ItemTemplate const* proto);
bool checkItem(ItemTemplate const* proto, Player const* player);
Season();
Season(uint32 itemLevel, time_t startingDate, time_t endDate);
bool checkItems(Player *pl);
bool canJoinArenaOrBg(Player *pl);
private:
bool enabled;
uint32 itemLevel;
time_t startingDate;
time_t endDate;
};
#define sASeasonMgr Season::instance()

Some files were not shown because too many files have changed in this diff Show More