mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
Merge remote-tracking branch 'refs/remotes/azerothcore/master'
This commit is contained in:
31
data/sql/updates/db_world/2017_06_29_00.sql
Normal file
31
data/sql/updates/db_world/2017_06_29_00.sql
Normal file
@@ -0,0 +1,31 @@
|
||||
-- DB update 2017_06_27_00 -> 2017_06_29_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 = '2017_06_27_00';
|
||||
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
|
||||
START TRANSACTION;
|
||||
ALTER TABLE version_db_world CHANGE COLUMN 2017_06_27_00 2017_06_29_00 bit;
|
||||
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1498768729664877100'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
|
||||
--
|
||||
-- START UPDATING QUERIES
|
||||
--
|
||||
INSERT INTO version_db_world (`sql_rev`) VALUES ('1498768729664877100');
|
||||
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (43369, -43369, -68347);
|
||||
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||
(43369, 68347, 0, "Worg Disguise"),
|
||||
(-43369, -68347, 0, "Worg Disguise"),
|
||||
(-68347, -43369, 0, "Worg Disguise");
|
||||
--
|
||||
-- END UPDATING QUERIES
|
||||
--
|
||||
COMMIT;
|
||||
END;
|
||||
//
|
||||
DELIMITER ;
|
||||
CALL updateDb();
|
||||
DROP PROCEDURE IF EXISTS `updateDb`;
|
||||
@@ -5148,6 +5148,8 @@ void Player::BuildPlayerRepop()
|
||||
|
||||
// set and clear other
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
|
||||
|
||||
sScriptMgr->OnPlayerReleasedGhost(this);
|
||||
}
|
||||
|
||||
void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
|
||||
@@ -1159,6 +1159,11 @@ bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target)
|
||||
}
|
||||
|
||||
// Player
|
||||
void ScriptMgr::OnPlayerReleasedGhost(Player* player)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnPlayerReleasedGhost(player);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPVPKill(Player* killer, Player* killed)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnPVPKill(killer, killed);
|
||||
|
||||
@@ -757,6 +757,7 @@ class PlayerScript : public ScriptObject
|
||||
PlayerScript(const char* name);
|
||||
|
||||
public:
|
||||
virtual void OnPlayerReleasedGhost(Player* /*player*/) { }
|
||||
|
||||
// Called when a player kills another player
|
||||
virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { }
|
||||
@@ -1171,6 +1172,7 @@ class ScriptMgr
|
||||
|
||||
public: /* PlayerScript */
|
||||
|
||||
void OnPlayerReleasedGhost(Player* player);
|
||||
void OnPVPKill(Player* killer, Player* killed);
|
||||
void OnCreatureKill(Player* killer, Creature* killed);
|
||||
void OnPlayerKilledByCreature(Creature* killer, Player* killed);
|
||||
|
||||
Reference in New Issue
Block a user