--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-24 10:58:07 -06:00
6 changed files with 23 additions and 17 deletions
+4 -2
View File
@@ -3,5 +3,7 @@ INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `commen
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-24132, 24134, 0, 'Wyvern Sting'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-24132, 24134, 0, 'Wyvern Sting');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-24133, 24135, 0, 'Wyvern Sting'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-24133, 24135, 0, 'Wyvern Sting');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-27068, 27069, 0, 'Wyvern Sting'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-27068, 27069, 0, 'Wyvern Sting');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-49011, 49009, 0, 'Wyvern Sting'); -- Rank 5 (not available till wotlk)
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-49012, 49010, 0, 'Wyvern Sting'); -- INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-49011, 49009, 0, 'Wyvern Sting');
-- Rank 6 (not available till wotlk)
-- INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-49012, 49010, 0, 'Wyvern Sting');
+2 -2
View File
@@ -5,8 +5,8 @@ UPDATE `creature_template` SET spell1 = 43218, flags_extra = 128, ScriptName = '
-- Broggok Poison Cloud -- Broggok Poison Cloud
UPDATE `creature_template` SET spell1 = 30914, flags_extra = 128, ScriptName = '' WHERE entry = 17662; UPDATE `creature_template` SET spell1 = 30914, flags_extra = 128, ScriptName = '' WHERE entry = 17662;
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (43468, 43648, 43658, 43658, 43658, 43658, 43658);
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43468, 44007, 1, 'Storm Eye Safe Zone'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43648, 44007, 1, 'Storm Eye Safe Zone');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43658, 43653, 0, 'Electrical Arc Visual'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43658, 43653, 0, 'Electrical Arc Visual');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43658, 43654, 0, 'Electrical Arc Visual'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43658, 43654, 0, 'Electrical Arc Visual');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43658, 43655, 0, 'Electrical Arc Visual'); INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43658, 43655, 0, 'Electrical Arc Visual');
+7
View File
@@ -0,0 +1,7 @@
-- Wyvern Sting rank 5 and 6 not avail. till wotlk
DELETE FROM spell_linked_spell WHERE `spell_trigger` IN (-49011, -49012);
-- typo
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (43468, 43648);
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (43648, 44007, 1, 'Storm Eye Safe Zone');
+2 -1
View File
@@ -219,7 +219,8 @@ void Creature::RemoveCorpse()
float x,y,z,o; float x,y,z,o;
GetRespawnCoord(x, y, z, &o); GetRespawnCoord(x, y, z, &o);
GetMap()->CreatureRelocation(this,x,y,z,o); SetHomePosition(x,y,z,o);
GetMap()->CreatureRelocation(this,x,y,z,o);
} }
/** /**
+1 -2
View File
@@ -34,7 +34,7 @@ void WaypointStore::Free()
void WaypointStore::Load() void WaypointStore::Load()
{ {
QueryResult *result = WorldDatabase.PQuery("SELECT MAX(`id`) FROM `waypoint_data"); QueryResult *result = WorldDatabase.PQuery("SELECT MAX(`id`) FROM `waypoint_data`");
if(!result) if(!result)
{ {
sLog.outError(" an error occured while loading the table `waypoint_data` ( maybe it doesn't exist ?)\n"); sLog.outError(" an error occured while loading the table `waypoint_data` ( maybe it doesn't exist ?)\n");
@@ -44,7 +44,6 @@ void WaypointStore::Load()
records = (*result)[0].GetUInt32(); records = (*result)[0].GetUInt32();
delete result; delete result;
result = WorldDatabase.PQuery("SELECT `id`,`point`,`position_x`,`position_y`,`position_z`,`move_flag`,`delay`,`action`,`action_chance` FROM `waypoint_data` ORDER BY `id`, `point`"); result = WorldDatabase.PQuery("SELECT `id`,`point`,`position_x`,`position_y`,`position_z`,`move_flag`,`delay`,`action`,`action_chance` FROM `waypoint_data` ORDER BY `id`, `point`");
if(!result) if(!result)
{ {
+7 -10
View File
@@ -15,24 +15,17 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
//Basic headers
//Basic header
#include <ctime>
#include "WaypointMovementGenerator.h" #include "WaypointMovementGenerator.h"
#include "DestinationHolderImp.h" #include "DestinationHolderImp.h"
//Accessors //Extended headers
#include "Database/DatabaseEnv.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "World.h" #include "World.h"
//Creature-specific headers //Creature-specific headers
#include "Creature.h" #include "Creature.h"
#include "CreatureAI.h" #include "CreatureAI.h"
//Player-Specific //Player-specific
#include "Player.h" #include "Player.h"
//Visual
#include "ProgressBar.h"
#include "MapManager.h"
template<class T> template<class T>
void void
@@ -42,6 +35,8 @@ template<>
void void
WaypointMovementGenerator<Creature>::Initialize(Creature &u) WaypointMovementGenerator<Creature>::Initialize(Creature &u)
{ {
u.StopMoving();
i_nextMoveTime.Reset(0);
i_currentNode = -1; i_currentNode = -1;
if(!path_id) if(!path_id)
path_id = u.GetWaypointPath(); path_id = u.GetWaypointPath();
@@ -160,6 +155,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
i_currentNode = 0; //Start moving all over again i_currentNode = 0; //Start moving all over again
else else
{ {
unit.SetHomePosition(node.x, node.y, node.z, unit.GetOrientation());
unit.GetMotionMaster()->Initialize(); unit.GetMotionMaster()->Initialize();
return false; //Clear the waypoint movement return false; //Clear the waypoint movement
} }
@@ -184,6 +180,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
MovementInform(unit); MovementInform(unit);
unit.UpdateWaypointID(i_currentNode); unit.UpdateWaypointID(i_currentNode);
unit.clearUnitState(UNIT_STAT_MOVING); unit.clearUnitState(UNIT_STAT_MOVING);
unit.Relocate(node.x, node.y, node.z);
} }
} }
else else