From 7fe257a073daa08a1edd54806bc0b835ab273397 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 18 Jan 2009 15:04:27 -0600 Subject: *Fix a bug that cause crash when player login. --HG-- branch : trunk --- src/game/Unit.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/game') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ed921d85fa5..607e33d6219 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -258,9 +258,12 @@ Unit::~Unit() if(m_charmInfo) delete m_charmInfo; - sLog.outDetail("Deconstruct Unit Entry = %u", GetEntry()); - if(m_scAuras.size()) - sLog.outError("Unit %u has sc auras during deconstruction", GetEntry()); + if(m_uint32Values) + { + sLog.outDetail("Deconstruct Unit Entry = %u", GetEntry()); + if(m_scAuras.size()) + sLog.outError("Unit %u has sc auras during deconstruction", GetEntry()); + } } void Unit::Update( uint32 p_time ) -- cgit v1.2.3 From 078f5566409e961cf9b07ffca8b196aeb6297f5c Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 18 Jan 2009 17:55:32 -0600 Subject: *Fix the bug that player turn to wrong direction after charge. --HG-- branch : trunk --- src/game/PointMovementGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game') diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index 31b696bcd3b..bb37d7b9479 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -57,7 +57,7 @@ bool PointMovementGenerator::Update(T &unit, const uint32 &diff) if(i_destinationHolder.HasArrived()) { - unit.StopMoving(); + //unit.StopMoving(); if(!unit.hasUnitState(UNIT_STAT_CHARGING)) MovementInform(unit); return false; -- cgit v1.2.3 From a07f3af045d1aaa2152168c42739dd23705b6b2f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 19 Jan 2009 17:38:03 +0100 Subject: *Merged db_version and script_db_version table in one table - by Zor --HG-- branch : trunk --- sql/updates/917_world.sql | 8 ++++++++ src/bindings/scripts/ScriptMgr.cpp | 4 ++-- .../serpent_shrine/boss_fathomlord_karathress.cpp | 2 +- src/game/World.cpp | 2 +- src/trinitycore/Master.cpp | 3 +++ 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 sql/updates/917_world.sql (limited to 'src/game') diff --git a/sql/updates/917_world.sql b/sql/updates/917_world.sql new file mode 100644 index 00000000000..084091ec0af --- /dev/null +++ b/sql/updates/917_world.sql @@ -0,0 +1,8 @@ +CREATE TABLE `version` ( + `core_version` varchar(120) default NULL COMMENT 'Core revision dumped at startup.', + `db_version` varchar(120) default NULL COMMENT 'Version of world DB.', + `script_version` varchar(120) default NULL COMMENT 'Version of scripts DB.' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Version Notes'; +INSERT INTO version (core_version, db_version, script_version) VALUES ("",(SELECT version FROM db_version),(SELECT version FROM script_db_version)); +DROP TABLE IF EXISTS db_version; +DROP TABLE IF EXISTS script_db_version; \ No newline at end of file diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index d415e8adfbe..c39102a1d7a 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -630,7 +630,7 @@ void LoadDatabase() QueryResult *result; //Get Version information - result = TScriptDB.PQuery("SELECT version FROM script_db_version"); + result = TScriptDB.PQuery("SELECT script_version FROM version LIMIT 1"); if (result) { @@ -641,7 +641,7 @@ void LoadDatabase() }else { - error_log("TSCR: Missing `script_db_version` information."); + error_log("TSCR: Missing `version.script_version` information."); outstring_log(""); } diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp index c653ff23ca0..933b4c0361f 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -65,7 +65,7 @@ EndScriptData */ #define SPELL_WATER_BOLT_VOLLEY 38335 #define SPELL_TIDAL_SURGE 38358 #define SPELL_TIDAL_SURGE_FREEZE 38357 -#define SPELL_HEAL 41386 +#define SPELL_HEAL 38330 #define SPELL_SUMMON_CYCLONE 38337 #define SPELL_CYCLONE_CYCLONE 29538 diff --git a/src/game/World.cpp b/src/game/World.cpp index 219c656dcaf..6865421a326 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -3001,7 +3001,7 @@ void World::UpdateMaxSessionCounters() void World::LoadDBVersion() { - QueryResult* result = WorldDatabase.Query("SELECT version FROM db_version LIMIT 1"); + QueryResult* result = WorldDatabase.Query("SELECT db_version FROM version LIMIT 1"); if(result) { Field* fields = result->Fetch(); diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index ed526f497c3..63c88807738 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -458,6 +458,9 @@ bool Master::_StartDB() ///- Clean the database before starting clearOnlineAccounts(); + ///- Insert version info into DB + WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s'", _FULLVERSION); + sWorld.LoadDBVersion(); sLog.outString("Using %s", sWorld.GetDBVersion()); -- cgit v1.2.3 From d1f6472e2bb6c55d6e837eefdeb7efdd10018a81 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 19 Jan 2009 20:08:32 -0600 Subject: *Fix a bug that pet attacks owner. --HG-- branch : trunk --- src/game/Unit.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/game') diff --git a/src/game/Unit.h b/src/game/Unit.h index 9b39254ee1e..07899aff090 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -356,7 +356,7 @@ enum UnitState UNIT_STAT_STUNNED = 0x00000008, UNIT_STAT_ROAMING = 0x00000010, UNIT_STAT_CHASE = 0x00000020, - UNIT_STAT_SEARCHING = 0x00000040, + //UNIT_STAT_SEARCHING = 0x00000040, UNIT_STAT_FLEEING = 0x00000080, UNIT_STAT_IN_FLIGHT = 0x00000100, // player is in flight mode UNIT_STAT_FOLLOW = 0x00000200, @@ -368,9 +368,9 @@ enum UnitState UNIT_STAT_CASTING = 0x00008000, UNIT_STAT_POSSESSED = 0x00010000, UNIT_STAT_CHARGING = 0x00020000, - UNIT_STAT_MOVING = (UNIT_STAT_ROAMING | UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FOLLOW), + UNIT_STAT_MOVING = (UNIT_STAT_ROAMING | UNIT_STAT_CHASE), UNIT_STAT_LOST_CONTROL = (UNIT_STAT_CONFUSED | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_CHARGING), - UNIT_STAT_SIGHTLESS = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CHASE | UNIT_STAT_SEARCHING), + UNIT_STAT_SIGHTLESS = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CHASE), UNIT_STAT_CANNOT_AUTOATTACK = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CASTING), UNIT_STAT_ALL_STATE = 0xffffffff //(UNIT_STAT_STOPPED | UNIT_STAT_MOVING | UNIT_STAT_IN_COMBAT | UNIT_STAT_IN_FLIGHT) }; @@ -1419,8 +1419,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject AuraMap m_Auras; - std::list m_scAuras; // casted singlecast auras - typedef std::list DynObjectGUIDs; DynObjectGUIDs m_dynObjGUIDs; @@ -1430,9 +1428,11 @@ class TRINITY_DLL_SPEC Unit : public WorldObject uint32 m_removedAuras; AuraList m_modAuras[TOTAL_AURAS]; - uint32 m_interruptMask; + AuraList m_scAuras; // casted singlecast auras AuraList m_interruptableAuras; AuraList m_ccAuras; + uint32 m_interruptMask; + float m_auraModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_END]; float m_weaponDamage[MAX_ATTACK][2]; bool m_canModifyStats; -- cgit v1.2.3