Skip to content

Commit

Permalink
Merge pull request azerothcore#3 from azerothcore/master
Browse files Browse the repository at this point in the history
Merge from Master Feb 09, 2018
  • Loading branch information
dunjeon committed Feb 9, 2018
2 parents 400cb2e + eacf410 commit f878a68
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
32 changes: 32 additions & 0 deletions data/sql/updates/db_world/2018_02_09_00.sql
@@ -0,0 +1,32 @@
-- DB update 2018_01_28_02 -> 2018_02_09_00
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2018_01_28_02';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2018_01_28_02 2018_02_09_00 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1518089572435453900'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--

INSERT INTO version_db_world (`sql_rev`) VALUES ('1518089572435453900');

-- The eggs should not be clickable
UPDATE `gameobject_template` SET `faction`='14' WHERE `entry`=177807;

-- Grethok the controller should shout "Intruders have breached the hatchery.." when engaged,
UPDATE `smart_scripts` SET `event_type`='4' WHERE `entryorguid`=12557 AND `source_type`=0 AND `id`=4 AND `link`=0;

--
-- END UPDATING QUERIES
--
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;
7 changes: 0 additions & 7 deletions data/sql/updates/pending_db_world/rev_1518089572435453900.sql

This file was deleted.

4 changes: 2 additions & 2 deletions src/server/game/Entities/Player/Player.cpp
Expand Up @@ -3567,6 +3567,8 @@ void Player::GiveLevel(uint8 level)
if (sWorld->getBoolConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up
UpdateSkillsToMaxSkillsForLevel();

_ApplyAllLevelScaleItemMods(true);

// set current level health and mana/energy to maximum after applying all mods.
SetFullHealth();
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
Expand All @@ -3576,8 +3578,6 @@ void Player::GiveLevel(uint8 level)
SetPower(POWER_FOCUS, 0);
SetPower(POWER_HAPPINESS, 0);

_ApplyAllLevelScaleItemMods(true);

// update level to hunter/summon pet
if (Pet* pet = GetPet())
pet->SynchronizeLevelWithOwner();
Expand Down

0 comments on commit f878a68

Please sign in to comment.