aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_10_24_00_world_sai.sql1
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp3
-rwxr-xr-xsrc/server/game/Entities/Unit/StatSystem.cpp69
-rwxr-xr-xsrc/server/game/Grids/GridStates.cpp12
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.cpp21
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiersImpl.h6
-rwxr-xr-xsrc/server/game/Grids/ObjectGridLoader.cpp6
7 files changed, 53 insertions, 65 deletions
diff --git a/sql/updates/world/2011_10_24_00_world_sai.sql b/sql/updates/world/2011_10_24_00_world_sai.sql
index 84ca98a40ee..30b2d026b6a 100644
--- a/sql/updates/world/2011_10_24_00_world_sai.sql
+++ b/sql/updates/world/2011_10_24_00_world_sai.sql
@@ -1,5 +1,6 @@
-- Fix sai of Darkspear Scout after recent fixing action 60
SET @N_DScout = 40416;
+SET @N_Voljin = 40391;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@N_DScout AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@N_DScout*100 AND `source_type`=9;
INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`)VALUES
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 66c5ca7b041..e033c041152 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -717,14 +717,13 @@ void SmartAI::SetFly(bool fly)
{
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
- me->SetFlying(true);
}
else
{
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
- me->SetFlying(false);
}
+ me->SetFlying(fly);
me->SendMovementFlagUpdate();
}
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 594203e0c46..3ab2f786086 100755
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -641,20 +641,21 @@ const float m_diminishing_k[MAX_CLASSES] =
float Player::GetMissPercentageFromDefence() const
{
- const float miss_cap[MAX_CLASSES] =
+ float const miss_cap[MAX_CLASSES] =
{
- 16.00f, // Warrior //correct
- 16.00f, // Paladin //correct
- 16.00f, // Hunter //?
- 16.00f, // Rogue //?
- 16.00f, // Priest //?
- 16.00f, // DK //correct
- 16.00f, // Shaman //?
- 16.00f, // Mage //?
- 16.00f, // Warlock //?
- 0.0f, // ??
- 16.00f // Druid //?
+ 16.00f, // Warrior //correct
+ 16.00f, // Paladin //correct
+ 16.00f, // Hunter //?
+ 16.00f, // Rogue //?
+ 16.00f, // Priest //?
+ 16.00f, // DK //correct
+ 16.00f, // Shaman //?
+ 16.00f, // Mage //?
+ 16.00f, // Warlock //?
+ 0.0f, // ??
+ 16.00f // Druid //?
};
+
float diminishing = 0.0f, nondiminishing = 0.0f;
// Modify value from defense skill (only bonus from defense rating diminishes)
nondiminishing += (GetSkillValue(SKILL_DEFENSE) - GetMaxSkillValueForLevel()) * 0.04f;
@@ -669,17 +670,17 @@ void Player::UpdateParryPercentage()
{
const float parry_cap[MAX_CLASSES] =
{
- 47.003525f, // Warrior
- 47.003525f, // Paladin
- 145.560408f, // Hunter
- 145.560408f, // Rogue
- 0.0f, // Priest
- 47.003525f, // DK
- 145.560408f, // Shaman
- 0.0f, // Mage
- 0.0f, // Warlock
- 0.0f, // ??
- 0.0f // Druid
+ 47.003525f, // Warrior
+ 47.003525f, // Paladin
+ 145.560408f, // Hunter
+ 145.560408f, // Rogue
+ 0.0f, // Priest
+ 47.003525f, // DK
+ 145.560408f, // Shaman
+ 0.0f, // Mage
+ 0.0f, // Warlock
+ 0.0f, // ??
+ 0.0f // Druid
};
// No parry
@@ -706,17 +707,17 @@ void Player::UpdateDodgePercentage()
{
const float dodge_cap[MAX_CLASSES] =
{
- 88.129021f, // Warrior
- 88.129021f, // Paladin
- 145.560408f, // Hunter
- 145.560408f, // Rogue
- 150.375940f, // Priest
- 88.129021f, // DK
- 145.560408f, // Shaman
- 150.375940f, // Mage
- 150.375940f, // Warlock
- 0.0f, // ??
- 116.890707f // Druid
+ 88.129021f, // Warrior
+ 88.129021f, // Paladin
+ 145.560408f, // Hunter
+ 145.560408f, // Rogue
+ 150.375940f, // Priest
+ 88.129021f, // DK
+ 145.560408f, // Shaman
+ 150.375940f, // Mage
+ 150.375940f, // Warlock
+ 0.0f, // ??
+ 116.890707f // Druid
};
float diminishing = 0.0f, nondiminishing = 0.0f;
diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp
index fd5e3c68a51..5f88516c9ac 100755
--- a/src/server/game/Grids/GridStates.cpp
+++ b/src/server/game/Grids/GridStates.cpp
@@ -21,13 +21,11 @@
#include "Grid.h"
#include "Log.h"
-void
-InvalidState::Update(Map &, NGridType &, GridInfo &, const uint32) const
+void InvalidState::Update(Map &, NGridType &, GridInfo &, const uint32) const
{
}
-void
-ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 t_diff) const
+void ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 t_diff) const
{
// Only check grid activity every (grid_expiry/10) ms, because it's really useless to do it every cycle
info.UpdateTimeTracker(t_diff);
@@ -48,16 +46,14 @@ ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 t_dif
}
}
-void
-IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32) const
+void IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32) const
{
m.ResetGridExpiry(grid);
grid.SetGridState(GRID_STATE_REMOVAL);
sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to REMOVAL state", grid.getX(), grid.getY(), m.GetId());
}
-void
-RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 t_diff) const
+void RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 t_diff) const
{
if (!info.getUnloadLock())
{
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index 0377713a520..edf55fe1c7b 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -30,8 +30,7 @@
using namespace Trinity;
-void
-VisibleNotifier::SendToSelf()
+void VisibleNotifier::SendToSelf()
{
// at this moment i_clientGUIDs have guids that not iterate at grid level checks
// but exist one case when this possible and object not out of range: transports
@@ -73,10 +72,9 @@ VisibleNotifier::SendToSelf()
i_player.SendInitialVisiblePackets(*it);
}
-void
-VisibleChangesNotifier::Visit(PlayerMapType &m)
+void VisibleChangesNotifier::Visit(PlayerMapType &m)
{
- for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if (iter->getSource() == &i_object)
continue;
@@ -91,8 +89,7 @@ VisibleChangesNotifier::Visit(PlayerMapType &m)
}
}
-void
-VisibleChangesNotifier::Visit(CreatureMapType &m)
+void VisibleChangesNotifier::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (!iter->getSource()->GetSharedVisionList().empty())
@@ -102,8 +99,7 @@ VisibleChangesNotifier::Visit(CreatureMapType &m)
(*i)->UpdateVisibilityOf(&i_object);
}
-void
-VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
+void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
@@ -241,8 +237,7 @@ void AIRelocationNotifier::Visit(CreatureMapType &m)
}
}
-void
-MessageDistDeliverer::Visit(PlayerMapType &m)
+void MessageDistDeliverer::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
@@ -321,8 +316,8 @@ MessageDistDeliverer::VisitObject(Player* plr)
}
*/
-template<class T> void
-ObjectUpdater::Visit(GridRefManager<T> &m)
+template<class T>
+void ObjectUpdater::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index dcd4207e3e1..543a1d1e280 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -28,8 +28,7 @@
#include "SpellAuras.h"
template<class T>
-inline void
-Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
+inline void Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
@@ -38,8 +37,7 @@ Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
}
}
-inline void
-Trinity::ObjectUpdater::Visit(CreatureMapType &m)
+inline void Trinity::ObjectUpdater::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (iter->getSource()->IsInWorld())
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index a696e02fdec..e38c74dd8e4 100755
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -130,8 +130,7 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellCoord &cell, CorpseMapTyp
}
}
-void
-ObjectGridLoader::Visit(GameObjectMapType &m)
+void ObjectGridLoader::Visit(GameObjectMapType &m)
{
uint32 x = (i_cell.GridX()*MAX_NUMBER_OF_CELLS) + i_cell.CellX();
uint32 y = (i_cell.GridY()*MAX_NUMBER_OF_CELLS) + i_cell.CellY();
@@ -156,8 +155,7 @@ ObjectGridLoader::Visit(CreatureMapType &m)
LoadHelper(cell_guids.creatures, cellCoord, m, i_creatures, i_map);
}
-void
-ObjectWorldLoader::Visit(CorpseMapType &m)
+void ObjectWorldLoader::Visit(CorpseMapType &m)
{
uint32 x = (i_cell.GridX()*MAX_NUMBER_OF_CELLS) + i_cell.CellX();
uint32 y = (i_cell.GridY()*MAX_NUMBER_OF_CELLS) + i_cell.CellY();