From 5c21144f6beb3a931afcf6791fc81a7cae57aab1 Mon Sep 17 00:00:00 2001 From: Dramacydal Date: Mon, 17 Jun 2013 10:49:24 +0100 Subject: [PATCH] [c12641] Delete wrong glyphs from character database on load and Update SMSG_GAMEOBJECT_CUSTOM_ANIM opcode value --- src/game/Opcodes.h | 2 +- src/game/Player.cpp | 3 +++ src/shared/revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/game/Opcodes.h b/src/game/Opcodes.h index c1470175c..9e2ee689d 100644 --- a/src/game/Opcodes.h +++ b/src/game/Opcodes.h @@ -231,7 +231,7 @@ enum Opcodes SMSG_ITEM_COOLDOWN = 0x4D14, // 4.3.4 15595 CMSG_GAMEOBJ_USE = 0x4E17, // 4.3.4 15595 CMSG_DESTROY_ITEMS = 0x10B3, - SMSG_GAMEOBJECT_CUSTOM_ANIM = 0x10B4, + SMSG_GAMEOBJECT_CUSTOM_ANIM = 0x4936, // 4.3.4 15595 CMSG_AREATRIGGER = 0x0937, // 4.3.4 15595 CMSG_MOVE_START_FORWARD = 0x7814, // 4.3.4 15595 CMSG_MOVE_START_BACKWARD = 0x330A, // 4.3.4 15595 diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 62a0d67df..351b433b2 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16217,6 +16217,7 @@ void Player::_LoadGlyphs(QueryResult* result) if (!gp) { sLog.outError("Player %s has not existing glyph entry %u on index %u, spec %u", m_name.c_str(), glyph, slot, spec); + CharacterDatabase.PExecute("DELETE FROM character_glyphs WHERE glyph = %u", glyph); continue; } @@ -16224,12 +16225,14 @@ void Player::_LoadGlyphs(QueryResult* result) if (!gs) { sLog.outError("Player %s has not existing glyph slot entry %u on index %u, spec %u", m_name.c_str(), GetGlyphSlot(slot), slot, spec); + CharacterDatabase.PExecute("DELETE FROM character_glyphs WHERE slot = %u AND spec = %u AND guid = %u", slot, spec, GetGUIDLow()); continue; } if (gp->TypeFlags != gs->TypeFlags) { sLog.outError("Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags); + CharacterDatabase.PExecute("DELETE FROM character_glyphs WHERE slot = %u AND spec = %u AND guid = %u", slot, spec, GetGUIDLow()); continue; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c53e3977e..c3a53680e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12640" + #define REVISION_NR "12641" #endif // __REVISION_NR_H__