Merge commit 'origin/master' into 310

Conflicts:
	src/game/UpdateData.cpp
This commit is contained in:
tomrus88 2009-05-05 10:44:12 +04:00
commit e75e66063e
38 changed files with 687 additions and 537 deletions

74
.gitignore vendored
View file

@ -9,56 +9,66 @@
# #
# Normal rules # Normal rules
# #
.*
compile *.o
FILES *.o.*
INSTALL *.a
*.pyc
*.[oa]
*.lo
*.loT
*.la
*.laT
*.so *.so
*.bak *.so.dbg
*.dist *.bin
.deps *.gz
.libs
*~
.*.swp
Makefile.in
Makefile
core #
core.* # Top-level generic files
!core.h #
vgcore* tags
TAGS
doc/html INSTALL
doc/Doxyfile !.gitignore
doc/doxygen.log
#
# Build generated files
#
aclocal.m4 aclocal.m4
autom4te.cache autom4te.cache
compile
config.guess config.guess
config.h.in config.h.in
config.log
config.status
config.sub config.sub
configure configure
depcomp depcomp
libtool
install-sh install-sh
ltmain.sh ltmain.sh
missing missing
config.log
config.status
libtool
stamp-h1 stamp-h1
Makefile.in
Makefile
#
# Editors / debuggers / other output files
#
*~
*.bak
*.orig
*.patch
callgrind.out.* callgrind.out.*
# #
# Git stuff
# #
# MaNGOS generated files # stgit directories
# patches-*
#
# VS binaries output
#
bin/* bin/*
#
# Special exceptions
#
!dep/ACE_wrappers/ace/ace_message_table.bin

14
doc/.gitignore vendored Normal file
View file

@ -0,0 +1,14 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Doxygen generic files
#
html
Doxyfile
doxygen.log

View file

@ -562,6 +562,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
{ {
// std. case: increment at 1 // std. case: increment at 1
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST:
case ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS:
// AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
if(!miscvalue1) if(!miscvalue1)
continue; continue;
@ -1151,7 +1152,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case ACHIEVEMENT_CRITERIA_TYPE_HK_RACE: case ACHIEVEMENT_CRITERIA_TYPE_HK_RACE:
case ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS: case ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS:
case ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS: case ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS:
case ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS:
case ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL: case ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL:
case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE: case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE:
case ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL: case ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL:

View file

@ -53,8 +53,8 @@ class MANGOS_DLL_SPEC FleeingMovementGenerator
float i_last_distance_from_caster; float i_last_distance_from_caster;
float i_to_distance_from_caster; float i_to_distance_from_caster;
float i_cur_angle; float i_cur_angle;
TimeTracker i_nextCheckTime;
uint64 i_frightGUID; uint64 i_frightGUID;
TimeTracker i_nextCheckTime;
DestinationHolder< Traveller<T> > i_destinationHolder; DestinationHolder< Traveller<T> > i_destinationHolder;
}; };

View file

@ -196,7 +196,6 @@ void WorldSession::HandleGroupAcceptOpcode( WorldPacket & /*recv_data*/ )
if(!group->AddMember(GetPlayer()->GetGUID(), GetPlayer()->GetName())) if(!group->AddMember(GetPlayer()->GetGUID(), GetPlayer()->GetName()))
return; return;
uint8 subgroup = group->GetMemberGroup(GetPlayer()->GetGUID());
} }
void WorldSession::HandleGroupDeclineOpcode( WorldPacket & /*recv_data*/ ) void WorldSession::HandleGroupDeclineOpcode( WorldPacket & /*recv_data*/ )

View file

@ -189,6 +189,22 @@ enum GuildEmblem
ERR_GUILDEMBLEM_INVALIDVENDOR = 5 ERR_GUILDEMBLEM_INVALIDVENDOR = 5
}; };
inline uint32 GetGuildBankTabPrice(uint8 Index)
{
switch(Index)
{
case 0: return 100;
case 1: return 250;
case 2: return 500;
case 3: return 1000;
case 4: return 2500;
case 5: return 5000;
default:
return 0;
}
return 0;
}
struct GuildBankEvent struct GuildBankEvent
{ {
uint32 LogGuid; uint32 LogGuid;

View file

@ -1573,7 +1573,7 @@ void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
if(!pGuild) if(!pGuild)
return; return;
uint32 TabCost = objmgr.GetGuildBankTabPrice(TabId) * GOLD; uint32 TabCost = GetGuildBankTabPrice(TabId) * GOLD;
if (!TabCost) if (!TabCost)
return; return;

View file

@ -665,7 +665,7 @@ bool ChatHandler::HandleReloadSpellScriptsCommand(const char* arg)
return true; return true;
} }
bool ChatHandler::HandleReloadDbScriptStringCommand(const char* arg) bool ChatHandler::HandleReloadDbScriptStringCommand(const char* /*arg*/)
{ {
sLog.outString( "Re-Loading Script strings from `db_script_string`..."); sLog.outString( "Re-Loading Script strings from `db_script_string`...");
objmgr.LoadDbScriptStrings(); objmgr.LoadDbScriptStrings();
@ -1998,7 +1998,7 @@ bool ChatHandler::HandleAddItemCommand(const char* args)
if(args[0]=='[') // [name] manual form if(args[0]=='[') // [name] manual form
{ {
char* citemName = citemName = strtok((char*)args, "]"); char* citemName = strtok((char*)args, "]");
if(citemName && citemName[0]) if(citemName && citemName[0])
{ {
@ -3411,7 +3411,7 @@ bool ChatHandler::HandleDamageCommand(const char * args)
if(!spellid || !sSpellStore.LookupEntry(spellid)) if(!spellid || !sSpellStore.LookupEntry(spellid))
return false; return false;
m_session->GetPlayer()->SpellNonMeleeDamageLog(target, spellid, damage, false); m_session->GetPlayer()->SpellNonMeleeDamageLog(target, spellid, damage);
return true; return true;
} }
@ -4911,7 +4911,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
return true; return true;
} }
bool ChatHandler::HandleServerShutDownCancelCommand(const char* args) bool ChatHandler::HandleServerShutDownCancelCommand(const char* /*args*/)
{ {
sWorld.ShutdownCancel(); sWorld.ShutdownCancel();
return true; return true;
@ -4928,7 +4928,7 @@ bool ChatHandler::HandleServerShutDownCommand(const char* args)
int32 time = atoi (time_str); int32 time = atoi (time_str);
///- Prevent interpret wrong arg value as 0 secs shutdown time ///- Prevent interpret wrong arg value as 0 secs shutdown time
if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) if ((time == 0 && (time_str[0]!='0' || time_str[1]!='\0')) || time < 0)
return false; return false;
if (exitcode_str) if (exitcode_str)
@ -6803,7 +6803,7 @@ bool ChatHandler::HandleModifyGenderCommand(const char *args)
if(!player) if(!player)
{ {
PSendSysMessage(LANG_NO_PLAYER); PSendSysMessage(LANG_PLAYER_NOT_FOUND);
SetSentErrorMessage(true); SetSentErrorMessage(true);
return false; return false;
} }

View file

@ -183,8 +183,9 @@ void Map::DeleteStateMachine()
Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode) Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode)
: i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), : i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode),
i_id(id), i_InstanceId(InstanceId), m_unloadTimer(0), i_gridExpiry(expiry), i_id(id), i_InstanceId(InstanceId), m_unloadTimer(0),
m_activeNonPlayersIter(m_activeNonPlayers.end()) m_activeNonPlayersIter(m_activeNonPlayers.end()),
i_gridExpiry(expiry)
{ {
for(unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx) for(unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
{ {
@ -1226,7 +1227,7 @@ uint16 GridMap::getArea(float x, float y)
return m_area_map[lx*16 + ly]; return m_area_map[lx*16 + ly];
} }
float GridMap::getHeightFromFlat(float x, float y) const float GridMap::getHeightFromFlat(float /*x*/, float /*y*/) const
{ {
return m_gridHeight; return m_gridHeight;
} }
@ -1640,10 +1641,72 @@ uint16 Map::GetAreaFlag(float x, float y, float z) const
case 2456: // Death's Breach (Eastern Plaguelands) case 2456: // Death's Breach (Eastern Plaguelands)
if(z > 350.0f) areaflag = 1950; break; if(z > 350.0f) areaflag = 1950; break;
// Dalaran // Dalaran
case 1593: // Crystalsong Forest
case 2484: // The Twilight Rivulet (Crystalsong Forest)
case 2492: // Forlorn Woods (Crystalsong Forest) case 2492: // Forlorn Woods (Crystalsong Forest)
if (x > 5568.0f && x < 6116.0f && y > 282.0f && y < 982.0f && z > 563.0f) areaflag = 2153; break; if (x > 5568.0f && x < 6116.0f && y > 282.0f && y < 982.0f && z > 563.0f)
{
// Krasus' Landing (Dalaran), fast check
if (x > 5758.77f && x < 5869.03f && y < 510.46f)
{
// Krasus' Landing (Dalaran), with open east side
if (y < 449.33f || (x-5813.9f)*(x-5813.9f)+(y-449.33f)*(y-449.33f) < 1864.0f)
{
areaflag = 2533; // Note: also 2633, possible one flight allowed and other not allowed case
break;
}
}
// Dalaran
areaflag = 2153;
}
break;
// The Violet Citadel (Dalaran) or Dalaran
case 2484: // The Twilight Rivulet (Crystalsong Forest)
case 1593: // Crystalsong Forest
// Dalaran
if (x > 5568.0f && x < 6116.0f && y > 282.0f && y < 982.0f && z > 563.0f)
{
// The Violet Citadel (Dalaran), fast check
if (x > 5721.1f && x < 5884.66f && y > 764.4f && y < 948.0f)
{
// The Violet Citadel (Dalaran)
if ((x-5803.0f)*(x-5803.0f)+(y-846.18f)*(y-846.18f) < 6690.0f)
{
areaflag = 2696;
break;
}
}
// Dalaran
areaflag = 2153;
}
break;
// Vargoth's Retreat (Dalaran) or The Violet Citadel (Dalaran) or Dalaran
case 2504: // Violet Stand (Crystalsong Forest)
// Dalaran
if (x > 5568.0f && x < 6116.0f && y > 282.0f && y < 982.0f && z > 563.0f)
{
// The Violet Citadel (Dalaran), fast check
if (x > 5721.1f && x < 5884.66f && y > 764.4f && y < 948.0f)
{
// Vargoth's Retreat (Dalaran), nice slow circle with upper limit
if (z < 898.0f && (x-5765.0f)*(x-5765.0f)+(y-862.4f)*(y-862.4f) < 262.0f)
{
areaflag = 2748;
break;
}
// The Violet Citadel (Dalaran)
if ((x-5803.0f)*(x-5803.0f)+(y-846.18f)*(y-846.18f) < 6690.0f)
{
areaflag = 2696;
break;
}
}
// Dalaran
areaflag = 2153;
}
break;
// Maw of Neltharion (cave) // Maw of Neltharion (cave)
case 164: // Dragonblight case 164: // Dragonblight
case 1797: // Obsidian Dragonshrine (Dragonblight) case 1797: // Obsidian Dragonshrine (Dragonblight)

View file

@ -397,6 +397,8 @@ void MotionMaster::Mutate(MovementGenerator *m)
// DistractMovement interrupted by any other movement // DistractMovement interrupted by any other movement
case DISTRACT_MOTION_TYPE: case DISTRACT_MOTION_TYPE:
MovementExpired(false); MovementExpired(false);
default:
break;
} }
} }
m->Initialize(*i_owner); m->Initialize(*i_owner);

View file

@ -434,6 +434,10 @@ void WorldSession::HandleBinderActivateOpcode( WorldPacket & recv_data )
void WorldSession::SendBindPoint(Creature *npc) void WorldSession::SendBindPoint(Creature *npc)
{ {
// prevent set homebind to instances in any case
if(sMapStore.LookupEntry(GetPlayer()->GetMapId())->Instanceable())
return;
uint32 bindspell = 3286; uint32 bindspell = 3286;
uint32 zone_id = _player->GetZoneId(); uint32 zone_id = _player->GetZoneId();

View file

@ -173,6 +173,8 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
case GAMEOBJECT_TYPE_TRANSPORT: case GAMEOBJECT_TYPE_TRANSPORT:
flags |= UPDATEFLAG_TRANSPORT; flags |= UPDATEFLAG_TRANSPORT;
break; break;
default:
break;
} }
} }
@ -628,10 +630,10 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
*data << uint32(m_floatValues[ index ] < 0 ? 0 : m_floatValues[ index ]); *data << uint32(m_floatValues[ index ] < 0 ? 0 : m_floatValues[ index ]);
} }
// there are some float values which may be negative or can't get negative due to other checks // there are some float values which may be negative or can't get negative due to other checks
else if(index >= UNIT_FIELD_NEGSTAT0 && index <= UNIT_FIELD_NEGSTAT4 || else if ((index >= UNIT_FIELD_NEGSTAT0 && index <= UNIT_FIELD_NEGSTAT4) ||
index >= UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE && index <= (UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + 6) || (index >= UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE && index <= (UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE + 6)) ||
index >= UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE && index <= (UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + 6) || (index >= UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE && index <= (UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE + 6)) ||
index >= UNIT_FIELD_POSSTAT0 && index <= UNIT_FIELD_POSSTAT4) (index >= UNIT_FIELD_POSSTAT0 && index <= UNIT_FIELD_POSSTAT4))
{ {
*data << uint32(m_floatValues[ index ]); *data << uint32(m_floatValues[ index ]);
} }

View file

@ -124,14 +124,6 @@ ObjectMgr::ObjectMgr()
m_arenaTeamId = 1; m_arenaTeamId = 1;
m_auctionid = 1; m_auctionid = 1;
mGuildBankTabPrice.resize(GUILD_BANK_MAX_TABS);
mGuildBankTabPrice[0] = 100;
mGuildBankTabPrice[1] = 250;
mGuildBankTabPrice[2] = 500;
mGuildBankTabPrice[3] = 1000;
mGuildBankTabPrice[4] = 2500;
mGuildBankTabPrice[5] = 5000;
// Only zero condition left, others will be added while loading DB tables // Only zero condition left, others will be added while loading DB tables
mConditions.resize(1); mConditions.resize(1);
} }
@ -4848,8 +4840,10 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float
if(MapId != entry->map_id) if(MapId != entry->map_id)
{ {
// if find graveyard at different map from where entrance placed (or no entrance data), use any first // if find graveyard at different map from where entrance placed (or no entrance data), use any first
if (!mapEntry || mapEntry->entrance_map < 0 || mapEntry->entrance_map != entry->map_id || if (!mapEntry ||
mapEntry->entrance_x == 0 && mapEntry->entrance_y == 0) mapEntry->entrance_map < 0 ||
mapEntry->entrance_map != entry->map_id ||
(mapEntry->entrance_x == 0 && mapEntry->entrance_y == 0))
{ {
// not have any corrdinates for check distance anyway // not have any corrdinates for check distance anyway
entryFar = entry; entryFar = entry;
@ -6833,6 +6827,8 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
} }
break; break;
} }
case CONDITION_NONE:
break;
} }
return true; return true;
} }

View file

@ -695,8 +695,6 @@ class ObjectMgr
int GetIndexForLocale(LocaleConstant loc); int GetIndexForLocale(LocaleConstant loc);
LocaleConstant GetLocaleForIndex(int i); LocaleConstant GetLocaleForIndex(int i);
// guild bank tabs
uint32 GetGuildBankTabPrice(uint8 Index) const { return Index < GUILD_BANK_MAX_TABS ? mGuildBankTabPrice[Index] : 0; }
uint16 GetConditionId(ConditionType condition, uint32 value1, uint32 value2); uint16 GetConditionId(ConditionType condition, uint32 value1, uint32 value2);
bool IsPlayerMeetToCondition(Player const* player, uint16 condition_id) const bool IsPlayerMeetToCondition(Player const* player, uint16 condition_id) const
@ -864,9 +862,6 @@ class ObjectMgr
RespawnTimes mCreatureRespawnTimes; RespawnTimes mCreatureRespawnTimes;
RespawnTimes mGORespawnTimes; RespawnTimes mGORespawnTimes;
typedef std::vector<uint32> GuildBankTabPriceMap;
GuildBankTabPriceMap mGuildBankTabPrice;
// Storage for Conditions. First element (index 0) is reserved for zero-condition (nothing required) // Storage for Conditions. First element (index 0) is reserved for zero-condition (nothing required)
typedef std::vector<PlayerCondition> ConditionStore; typedef std::vector<PlayerCondition> ConditionStore;
ConditionStore mConditions; ConditionStore mConditions;

View file

@ -38,8 +38,8 @@ char const* petTypeSuffix[MAX_PET_TYPE] =
}; };
Pet::Pet(PetType type) : Pet::Pet(PetType type) :
Creature(), m_petType(type), m_removed(false), m_happinessTimer(7500), m_duration(0), m_bonusdamage(0), Creature(), m_removed(false), m_petType(type), m_happinessTimer(7500), m_duration(0), m_resetTalentsCost(0),
m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraUpdateMask(0), m_loading(false), m_bonusdamage(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraUpdateMask(0), m_loading(false),
m_declinedname(NULL) m_declinedname(NULL)
{ {
m_isPet = true; m_isPet = true;
@ -1278,6 +1278,12 @@ bool Pet::addSpell(uint32 spell_id, uint16 active, PetSpellState state, PetSpell
{ {
// can be in case spell loading but learned at some previous spell loading // can be in case spell loading but learned at some previous spell loading
itr->second->state = PETSPELL_UNCHANGED; itr->second->state = PETSPELL_UNCHANGED;
if(active == ACT_ENABLED)
ToggleAutocast(spell_id, true);
else if(active == ACT_DISABLED)
ToggleAutocast(spell_id, false);
return false; return false;
} }
else else
@ -1677,8 +1683,13 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)
if (i == m_autospells.size()) if (i == m_autospells.size())
{ {
m_autospells.push_back(spellid); m_autospells.push_back(spellid);
itr->second->active = ACT_ENABLED;
itr->second->state = PETSPELL_CHANGED; if(itr->second->active != ACT_ENABLED)
{
itr->second->active = ACT_ENABLED;
if(itr->second->state != PETSPELL_NEW)
itr->second->state = PETSPELL_CHANGED;
}
} }
} }
else else
@ -1690,8 +1701,12 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)
if (i < m_autospells.size()) if (i < m_autospells.size())
{ {
m_autospells.erase(itr2); m_autospells.erase(itr2);
itr->second->active = ACT_DISABLED; if(itr->second->active != ACT_DISABLED)
itr->second->state = PETSPELL_CHANGED; {
itr->second->active = ACT_DISABLED;
if(itr->second->state != PETSPELL_NEW)
itr->second->state = PETSPELL_CHANGED;
}
} }
} }
} }

View file

@ -48,8 +48,8 @@ class MANGOS_DLL_DECL PetAI : public CreatureAI
void UpdateAllies(); void UpdateAllies();
bool inCombat;
TimeTracker i_tracker; TimeTracker i_tracker;
bool inCombat;
std::set<uint64> m_AllySet; std::set<uint64> m_AllySet;
uint32 m_updateAlliesTimer; uint32 m_updateAlliesTimer;

View file

@ -1868,6 +1868,7 @@ void Player::Regenerate(Powers power)
} break; } break;
case POWER_FOCUS: case POWER_FOCUS:
case POWER_HAPPINESS: case POWER_HAPPINESS:
case POWER_HEALTH:
break; break;
} }
@ -1957,8 +1958,8 @@ Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
if(!IsInWorld()) if(!IsInWorld())
return NULL; return NULL;
// exist // exist (we need look pets also for some interaction (quest/etc)
Creature *unit = GetMap()->GetCreature(guid); Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if (!unit) if (!unit)
return NULL; return NULL;
@ -1974,8 +1975,8 @@ Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
if(!unit->isAlive() && (!unit->isSpiritService() || isAlive() )) if(!unit->isAlive() && (!unit->isSpiritService() || isAlive() ))
return NULL; return NULL;
// not allow interaction under control // not allow interaction under control, but allow with own pets
if(unit->GetCharmerOrOwnerGUID()) if(unit->GetCharmerGUID())
return NULL; return NULL;
// not enemy // not enemy
@ -3420,6 +3421,7 @@ bool Player::resetTalents(bool no_cost)
{ {
ModifyMoney(-(int32)cost); ModifyMoney(-(int32)cost);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS, cost); GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS, cost);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS, 1);
m_resetTalentsCost = cost; m_resetTalentsCost = cost;
m_resetTalentsTime = time(NULL); m_resetTalentsTime = time(NULL);
@ -4807,6 +4809,8 @@ void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
UpdateExpertise(OFF_ATTACK); UpdateExpertise(OFF_ATTACK);
} }
break; break;
case CR_ARMOR_PENETRATION:
break;
} }
} }
@ -5353,7 +5357,7 @@ int16 Player::GetSkillTempBonusValue(uint32 skill) const
return 0; return 0;
} }
void Player::SendInitialActionButtons() void Player::SendInitialActionButtons() const
{ {
sLog.outDetail( "Initializing Action Buttons for '%u'", GetGUIDLow() ); sLog.outDetail( "Initializing Action Buttons for '%u'", GetGUIDLow() );
@ -5607,7 +5611,7 @@ uint32 Player::TeamForRace(uint8 race)
case 1: return HORDE; case 1: return HORDE;
} }
sLog.outError("Race %u have wrong team id in DBC: wrong DBC files?",uint32(race),rEntry->TeamID); sLog.outError("Race %u have wrong teamid %u in DBC: wrong DBC files?",uint32(race),rEntry->TeamID);
return ALLIANCE; return ALLIANCE;
} }
@ -9651,7 +9655,6 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
if (!pItem->IsBag()) if (!pItem->IsBag())
return EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT; return EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT;
Bag *pBag = (Bag*)pItem;
if( !HasBankBagSlot( slot ) ) if( !HasBankBagSlot( slot ) )
return EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT; return EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT;
@ -11775,7 +11778,9 @@ void Player::PrepareQuestMenu( uint64 guid )
Object *pObject; Object *pObject;
QuestRelations* pObjectQR; QuestRelations* pObjectQR;
QuestRelations* pObjectQIR; QuestRelations* pObjectQIR;
Creature *pCreature = GetMap()->GetCreature(guid);
// pets also can have quests
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if( pCreature ) if( pCreature )
{ {
pObject = (Object*)pCreature; pObject = (Object*)pCreature;
@ -11861,7 +11866,9 @@ void Player::SendPreparedQuest( uint64 guid )
qe._Delay = 0; qe._Delay = 0;
qe._Emote = 0; qe._Emote = 0;
std::string title = ""; std::string title = "";
Creature *pCreature = GetMap()->GetCreature(guid);
// need pet case for some quests
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if( pCreature ) if( pCreature )
{ {
uint32 textid = pCreature->GetNpcTextId(); uint32 textid = pCreature->GetNpcTextId();
@ -11925,7 +11932,7 @@ Quest const * Player::GetNextQuest( uint64 guid, Quest const *pQuest )
QuestRelations* pObjectQR; QuestRelations* pObjectQR;
QuestRelations* pObjectQIR; QuestRelations* pObjectQIR;
Creature *pCreature = GetMap()->GetCreature(guid); Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
if( pCreature ) if( pCreature )
{ {
pObject = (Object*)pCreature; pObject = (Object*)pCreature;
@ -12988,7 +12995,6 @@ void Player::AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& ques
uint32 reqitemcount = pQuest->ReqItemCount[i]; uint32 reqitemcount = pQuest->ReqItemCount[i];
if( reqitemcount != 0 ) if( reqitemcount != 0 )
{ {
uint32 quest_id = pQuest->GetQuestId();
uint32 curitemcount = GetItemCount(pQuest->ReqItemId[i],true); uint32 curitemcount = GetItemCount(pQuest->ReqItemId[i],true);
questStatusData.m_itemcount[i] = std::min(curitemcount, reqitemcount); questStatusData.m_itemcount[i] = std::min(curitemcount, reqitemcount);
@ -18475,7 +18481,7 @@ uint32 Player::GetResurrectionSpellId()
case 27239: spell_id = 27240; break; // rank 6 case 27239: spell_id = 27240; break; // rank 6
case 47883: spell_id = 47882; break; // rank 7 case 47883: spell_id = 47882; break; // rank 7
default: default:
sLog.outError("Unhandled spell %%u: S.Resurrection",(*itr)->GetId()); sLog.outError("Unhandled spell %u: S.Resurrection",(*itr)->GetId());
continue; continue;
} }
@ -18639,17 +18645,17 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
{ {
if(pRewardSource->GetDistance(this) <= sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE)) if (pRewardSource->IsWithinDistInMap(this,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE)))
return true; return true;
if(isAlive()) if (isAlive())
return false; return false;
Corpse* corpse = GetCorpse(); Corpse* corpse = GetCorpse();
if(!corpse) if (!corpse)
return false; return false;
return pRewardSource->GetDistance(corpse) <= sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE); return pRewardSource->IsWithinDistInMap(corpse,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE));
} }
uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const

View file

@ -1448,7 +1448,7 @@ class MANGOS_DLL_SPEC Player : public Unit
bool addActionButton(uint8 button, uint16 action, uint8 type, uint8 misc); bool addActionButton(uint8 button, uint16 action, uint8 type, uint8 misc);
void removeActionButton(uint8 button); void removeActionButton(uint8 button);
void SendInitialActionButtons(); void SendInitialActionButtons() const;
PvPInfo pvpInfo; PvPInfo pvpInfo;
void UpdatePvP(bool state, bool ovrride=false); void UpdatePvP(bool state, bool ovrride=false);

View file

@ -43,9 +43,9 @@ class MANGOS_DLL_SPEC PointMovementGenerator
bool GetDestination(float& x, float& y, float& z) const { x=i_x; y=i_y; z=i_z; return true; } bool GetDestination(float& x, float& y, float& z) const { x=i_x; y=i_y; z=i_z; return true; }
private: private:
TimeTracker i_nextMoveTime;
float i_x,i_y,i_z;
uint32 id; uint32 id;
float i_x,i_y,i_z;
TimeTracker i_nextMoveTime;
DestinationHolder< Traveller<T> > i_destinationHolder; DestinationHolder< Traveller<T> > i_destinationHolder;
}; };
#endif #endif

View file

@ -322,7 +322,7 @@ bool PoolGroup<GameObject>::ReSpawn1Object(uint32 guid)
// Nothing to do for a child Pool // Nothing to do for a child Pool
template <> template <>
bool PoolGroup<Pool>::ReSpawn1Object(uint32 guid) bool PoolGroup<Pool>::ReSpawn1Object(uint32 /*guid*/)
{ {
return true; return true;
} }
@ -623,6 +623,7 @@ void PoolHandler::Initialize()
SpawnPool(pool_entry); SpawnPool(pool_entry);
count++; count++;
} while (result->NextRow()); } while (result->NextRow());
delete result;
} }
sLog.outBasic("Pool handling system initialized, %u pools spawned.", count); sLog.outBasic("Pool handling system initialized, %u pools spawned.", count);

View file

@ -618,7 +618,8 @@ void WorldSession::HandleQuestgiverStatusQueryMultipleOpcode(WorldPacket& /*recv
if(IS_CREATURE_GUID(*itr)) if(IS_CREATURE_GUID(*itr))
{ {
Creature *questgiver = GetPlayer()->GetMap()->GetCreature(*itr); // need also pet quests case support
Creature *questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(),*itr);
if(!questgiver || questgiver->IsHostileTo(_player)) if(!questgiver || questgiver->IsHostileTo(_player))
continue; continue;
if(!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER)) if(!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))

View file

@ -91,7 +91,7 @@ void LoadSkillDiscoveryTable()
// explicit discovery ability // explicit discovery ability
!IsExplicitDiscoverySpell(spellEntry)) !IsExplicitDiscoverySpell(spellEntry))
{ {
sLog.outErrorDb("Spell (ID: %u) not have have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc and not 100% chance random discovery ability but listed in `skill_discovery_template` table",spellId); sLog.outErrorDb("Spell (ID: %u) not have have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc and not 100%% chance random discovery ability but listed in `skill_discovery_template` table",spellId);
continue; continue;
} }

View file

@ -240,6 +240,8 @@ void SocialMgr::SendFriendStatus(Player *player, FriendsResult result, uint32 fr
case FRIEND_ADDED_ONLINE: case FRIEND_ADDED_ONLINE:
data << fi.Note; data << fi.Note;
break; break;
default:
break;
} }
switch(result) switch(result)
@ -251,6 +253,8 @@ void SocialMgr::SendFriendStatus(Player *player, FriendsResult result, uint32 fr
data << uint32(fi.Level); data << uint32(fi.Level);
data << uint32(fi.Class); data << uint32(fi.Class);
break; break;
default:
break;
} }
if(broadcast) if(broadcast)

View file

@ -2877,6 +2877,8 @@ void Spell::SendCastResult(SpellCastResult result)
data << uint32(m_spellInfo->EquippedItemSubClassMask); data << uint32(m_spellInfo->EquippedItemSubClassMask);
//data << uint32(m_spellInfo->EquippedItemInventoryTypeMask); //data << uint32(m_spellInfo->EquippedItemInventoryTypeMask);
break; break;
default:
break;
} }
((Player*)m_caster)->GetSession()->SendPacket(&data); ((Player*)m_caster)->GetSession()->SendPacket(&data);
} }
@ -2895,8 +2897,6 @@ void Spell::SendSpellStart()
if(m_spellInfo->runeCostID) if(m_spellInfo->runeCostID)
castFlags |= CAST_FLAG_UNKNOWN10; castFlags |= CAST_FLAG_UNKNOWN10;
Unit *target = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
WorldPacket data(SMSG_SPELL_START, (8+8+4+4+2)); WorldPacket data(SMSG_SPELL_START, (8+8+4+4+2));
if(m_CastItem) if(m_CastItem)
data.append(m_CastItem->GetPackGUID()); data.append(m_CastItem->GetPackGUID());
@ -2943,8 +2943,6 @@ void Spell::SendSpellGo()
sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id); sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
Unit *target = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
uint32 castFlags = CAST_FLAG_UNKNOWN3; uint32 castFlags = CAST_FLAG_UNKNOWN3;
if(IsRangedSpell()) if(IsRangedSpell())
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual

View file

@ -349,11 +349,11 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
static AuraType const frozenAuraTypes[] = { SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_STUN, SPELL_AURA_NONE }; static AuraType const frozenAuraTypes[] = { SPELL_AURA_MOD_ROOT, SPELL_AURA_MOD_STUN, SPELL_AURA_NONE };
Aura::Aura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem) : Aura::Aura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem) :
m_spellmod(NULL), m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), m_target(target), m_spellmod(NULL), m_caster_guid(0), m_target(target), m_castItemGuid(castItem?castItem->GetGUID():0),
m_timeCla(1000), m_periodicTimer(0), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE), m_timeCla(1000), m_periodicTimer(0), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE),
m_effIndex(eff), m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0), m_stackAmount(1), m_effIndex(eff), m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),
m_positive(false), m_permanent(false), m_isPeriodic(false), m_isAreaAura(false), m_isPersistent(false), m_positive(false), m_permanent(false), m_isPeriodic(false), m_isAreaAura(false), m_isPersistent(false),
m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false) m_isRemovedOnShapeLost(true), m_updated(false), m_in_use(false)
{ {
assert(target); assert(target);
@ -701,7 +701,6 @@ void AreaAura::Update(uint32 diff)
if( pGroup) if( pGroup)
{ {
uint8 subgroup = ((Player*)owner)->GetSubGroup();
for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{ {
Player* Target = itr->getSource(); Player* Target = itr->getSource();
@ -1305,7 +1304,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
m_target->CastSpell(m_target,45471,true); m_target->CastSpell(m_target,45471,true);
} }
} }
void Aura::HandleAddTargetTrigger(bool apply, bool Real) void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
{ {
// Use SpellModifier structure for check // Use SpellModifier structure for check
// used only fields: // used only fields:
@ -2556,7 +2555,7 @@ void Aura::HandleAuraHover(bool apply, bool Real)
m_target->SendMessageToSet(&data,true); m_target->SendMessageToSet(&data,true);
} }
void Aura::HandleWaterBreathing(bool apply, bool Real) void Aura::HandleWaterBreathing(bool /*apply*/, bool /*Real*/)
{ {
// update timers in client // update timers in client
if(m_target->GetTypeId()==TYPEID_PLAYER) if(m_target->GetTypeId()==TYPEID_PLAYER)
@ -2963,7 +2962,7 @@ void Aura::HandleForceReaction(bool apply, bool Real)
player->GetReputationMgr().SendForceReactions(); player->GetReputationMgr().SendForceReactions();
} }
void Aura::HandleAuraModSkill(bool apply, bool Real) void Aura::HandleAuraModSkill(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -3016,7 +3015,7 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
} }
} }
void Aura::HandleBindSight(bool apply, bool Real) void Aura::HandleBindSight(bool apply, bool /*Real*/)
{ {
Unit* caster = GetCaster(); Unit* caster = GetCaster();
if(!caster || caster->GetTypeId() != TYPEID_PLAYER) if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
@ -3025,7 +3024,7 @@ void Aura::HandleBindSight(bool apply, bool Real)
((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0); ((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0);
} }
void Aura::HandleFarSight(bool apply, bool Real) void Aura::HandleFarSight(bool apply, bool /*Real*/)
{ {
Unit* caster = GetCaster(); Unit* caster = GetCaster();
if(!caster || caster->GetTypeId() != TYPEID_PLAYER) if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
@ -3034,7 +3033,7 @@ void Aura::HandleFarSight(bool apply, bool Real)
((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0); ((Player*)caster)->SetFarSightGUID(apply ? m_target->GetGUID() : 0);
} }
void Aura::HandleAuraTrackCreatures(bool apply, bool Real) void Aura::HandleAuraTrackCreatures(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId()!=TYPEID_PLAYER) if(m_target->GetTypeId()!=TYPEID_PLAYER)
return; return;
@ -3044,7 +3043,7 @@ void Aura::HandleAuraTrackCreatures(bool apply, bool Real)
m_target->SetUInt32Value(PLAYER_TRACK_CREATURES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1) : 0 ); m_target->SetUInt32Value(PLAYER_TRACK_CREATURES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1) : 0 );
} }
void Aura::HandleAuraTrackResources(bool apply, bool Real) void Aura::HandleAuraTrackResources(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId()!=TYPEID_PLAYER) if(m_target->GetTypeId()!=TYPEID_PLAYER)
return; return;
@ -3054,7 +3053,7 @@ void Aura::HandleAuraTrackResources(bool apply, bool Real)
m_target->SetUInt32Value(PLAYER_TRACK_RESOURCES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1): 0 ); m_target->SetUInt32Value(PLAYER_TRACK_RESOURCES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1): 0 );
} }
void Aura::HandleAuraTrackStealthed(bool apply, bool Real) void Aura::HandleAuraTrackStealthed(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId()!=TYPEID_PLAYER) if(m_target->GetTypeId()!=TYPEID_PLAYER)
return; return;
@ -3065,7 +3064,7 @@ void Aura::HandleAuraTrackStealthed(bool apply, bool Real)
m_target->ApplyModFlag(PLAYER_FIELD_BYTES,PLAYER_FIELD_BYTE_TRACK_STEALTHED,apply); m_target->ApplyModFlag(PLAYER_FIELD_BYTES,PLAYER_FIELD_BYTE_TRACK_STEALTHED,apply);
} }
void Aura::HandleAuraModScale(bool apply, bool Real) void Aura::HandleAuraModScale(bool apply, bool /*Real*/)
{ {
m_target->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X,m_modifier.m_amount,apply); m_target->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X,m_modifier.m_amount,apply);
} }
@ -3193,7 +3192,7 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModPetTalentsPoints(bool Apply, bool Real) void Aura::HandleAuraModPetTalentsPoints(bool /*Apply*/, bool Real)
{ {
if(!Real) if(!Real)
return; return;
@ -3688,7 +3687,6 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
if(!Real) if(!Real)
return; return;
uint32 apply_stat = UNIT_STAT_ROOT;
if (apply) if (apply)
{ {
// Frost root aura -> freeze/unfreeze target // Frost root aura -> freeze/unfreeze target
@ -3986,7 +3984,7 @@ void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
/*** IMMUNITY ***/ /*** IMMUNITY ***/
/*********************************************************/ /*********************************************************/
void Aura::HandleModMechanicImmunity(bool apply, bool Real) void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
{ {
uint32 mechanic = 1 << m_modifier.m_miscvalue; uint32 mechanic = 1 << m_modifier.m_miscvalue;
@ -4063,7 +4061,7 @@ void Aura::HandleModMechanicImmunity(bool apply, bool Real)
} }
//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect //this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect
void Aura::HandleAuraModEffectImmunity(bool apply, bool Real) void Aura::HandleAuraModEffectImmunity(bool apply, bool /*Real*/)
{ {
// when removing flag aura, handle flag drop // when removing flag aura, handle flag drop
if( !apply && m_target->GetTypeId() == TYPEID_PLAYER if( !apply && m_target->GetTypeId() == TYPEID_PLAYER
@ -4139,7 +4137,7 @@ void Aura::HandleAuraModSchoolImmunity(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModDmgImmunity(bool apply, bool Real) void Aura::HandleAuraModDmgImmunity(bool apply, bool /*Real*/)
{ {
m_target->ApplySpellImmune(GetId(),IMMUNITY_DAMAGE,m_modifier.m_miscvalue,apply); m_target->ApplySpellImmune(GetId(),IMMUNITY_DAMAGE,m_modifier.m_miscvalue,apply);
} }
@ -4171,7 +4169,7 @@ void Aura::HandleAuraProcTriggerSpell(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModStalked(bool apply, bool Real) void Aura::HandleAuraModStalked(bool apply, bool /*Real*/)
{ {
// used by spells: Hunter's Mark, Mind Vision, Syndicate Tracker (MURP) DND // used by spells: Hunter's Mark, Mind Vision, Syndicate Tracker (MURP) DND
if(apply) if(apply)
@ -4184,7 +4182,7 @@ void Aura::HandleAuraModStalked(bool apply, bool Real)
/*** PERIODIC ***/ /*** PERIODIC ***/
/*********************************************************/ /*********************************************************/
void Aura::HandlePeriodicTriggerSpell(bool apply, bool Real) void Aura::HandlePeriodicTriggerSpell(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
if (m_spellProto->Id == 66 && !apply) if (m_spellProto->Id == 66 && !apply)
@ -4194,7 +4192,7 @@ void Aura::HandlePeriodicTriggerSpell(bool apply, bool Real)
} }
} }
void Aura::HandlePeriodicTriggerSpellWithValue(bool apply, bool Real) void Aura::HandlePeriodicTriggerSpellWithValue(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
@ -4213,7 +4211,7 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real)
m_modifier.m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000; m_modifier.m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000;
} }
void Aura::HandleAuraPowerBurn(bool apply, bool Real) void Aura::HandleAuraPowerBurn(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
@ -4258,7 +4256,7 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
m_isPeriodic = apply; m_isPeriodic = apply;
} }
void Aura::HandlePeriodicHeal(bool apply, bool Real) void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
@ -4371,7 +4369,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs //3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs //4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs //5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375}; float AP_per_combo[6] = {0.0f, 0.015f, 0.024f, 0.03f, 0.03428571f, 0.0375f};
uint8 cp = ((Player*)caster)->GetComboPoints(); uint8 cp = ((Player*)caster)->GetComboPoints();
if (cp > 5) cp = 5; if (cp > 5) cp = 5;
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);
@ -4424,22 +4422,22 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
} }
} }
void Aura::HandlePeriodicDamagePCT(bool apply, bool Real) void Aura::HandlePeriodicDamagePCT(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
void Aura::HandlePeriodicLeech(bool apply, bool Real) void Aura::HandlePeriodicLeech(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
void Aura::HandlePeriodicManaLeech(bool apply, bool Real) void Aura::HandlePeriodicManaLeech(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
void Aura::HandlePeriodicHealthFunnel(bool apply, bool Real) void Aura::HandlePeriodicHealthFunnel(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
@ -4452,7 +4450,7 @@ void Aura::HandlePeriodicHealthFunnel(bool apply, bool Real)
/*** RESISTANCE ***/ /*** RESISTANCE ***/
/********************************/ /********************************/
void Aura::HandleAuraModResistanceExclusive(bool apply, bool Real) void Aura::HandleAuraModResistanceExclusive(bool apply, bool /*Real*/)
{ {
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++) for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
{ {
@ -4465,7 +4463,7 @@ void Aura::HandleAuraModResistanceExclusive(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModResistance(bool apply, bool Real) void Aura::HandleAuraModResistance(bool apply, bool /*Real*/)
{ {
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++) for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
{ {
@ -4478,7 +4476,7 @@ void Aura::HandleAuraModResistance(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModBaseResistancePCT(bool apply, bool Real) void Aura::HandleAuraModBaseResistancePCT(bool apply, bool /*Real*/)
{ {
// only players have base stats // only players have base stats
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
@ -4497,7 +4495,7 @@ void Aura::HandleAuraModBaseResistancePCT(bool apply, bool Real)
} }
} }
void Aura::HandleModResistancePercent(bool apply, bool Real) void Aura::HandleModResistancePercent(bool apply, bool /*Real*/)
{ {
for(int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++) for(int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
{ {
@ -4513,7 +4511,7 @@ void Aura::HandleModResistancePercent(bool apply, bool Real)
} }
} }
void Aura::HandleModBaseResistance(bool apply, bool Real) void Aura::HandleModBaseResistance(bool apply, bool /*Real*/)
{ {
// only players have base stats // only players have base stats
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
@ -4534,7 +4532,7 @@ void Aura::HandleModBaseResistance(bool apply, bool Real)
/*** STAT ***/ /*** STAT ***/
/********************************/ /********************************/
void Aura::HandleAuraModStat(bool apply, bool Real) void Aura::HandleAuraModStat(bool apply, bool /*Real*/)
{ {
if (m_modifier.m_miscvalue < -2 || m_modifier.m_miscvalue > 4) if (m_modifier.m_miscvalue < -2 || m_modifier.m_miscvalue > 4)
{ {
@ -4555,7 +4553,7 @@ void Aura::HandleAuraModStat(bool apply, bool Real)
} }
} }
void Aura::HandleModPercentStat(bool apply, bool Real) void Aura::HandleModPercentStat(bool apply, bool /*Real*/)
{ {
if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4) if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4)
{ {
@ -4574,7 +4572,7 @@ void Aura::HandleModPercentStat(bool apply, bool Real)
} }
} }
void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real) void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -4585,7 +4583,7 @@ void Aura::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateSpellDamageAndHealingBonus(); ((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
} }
void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real) void Aura::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -4603,7 +4601,7 @@ void Aura::HandleAuraModDispelResist(bool apply, bool Real)
m_target->CastSpell(m_target,44416,true,NULL,this,GetCasterGUID()); m_target->CastSpell(m_target,44416,true,NULL,this,GetCasterGUID());
} }
void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real) void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -4614,7 +4612,7 @@ void Aura::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateSpellDamageAndHealingBonus(); ((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
} }
void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real) void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -4623,7 +4621,7 @@ void Aura::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real
((Player*)m_target)->UpdateSpellDamageAndHealingBonus(); ((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
} }
void Aura::HandleModHealingDone(bool /*apply*/, bool Real) void Aura::HandleModHealingDone(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -4632,7 +4630,7 @@ void Aura::HandleModHealingDone(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateSpellDamageAndHealingBonus(); ((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
} }
void Aura::HandleModTotalPercentStat(bool apply, bool Real) void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
{ {
if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4) if (m_modifier.m_miscvalue < -1 || m_modifier.m_miscvalue > 4)
{ {
@ -4663,7 +4661,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real) void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -4683,12 +4681,12 @@ void Aura::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
/********************************/ /********************************/
/*** HEAL & ENERGIZE ***/ /*** HEAL & ENERGIZE ***/
/********************************/ /********************************/
void Aura::HandleAuraModTotalHealthPercentRegen(bool apply, bool Real) void Aura::HandleAuraModTotalHealthPercentRegen(bool apply, bool /*Real*/)
{ {
m_isPeriodic = apply; m_isPeriodic = apply;
} }
void Aura::HandleAuraModTotalManaPercentRegen(bool apply, bool Real) void Aura::HandleAuraModTotalManaPercentRegen(bool apply, bool /*Real*/)
{ {
if(m_modifier.periodictime == 0) if(m_modifier.periodictime == 0)
m_modifier.periodictime = 1000; m_modifier.periodictime = 1000;
@ -4697,7 +4695,7 @@ void Aura::HandleAuraModTotalManaPercentRegen(bool apply, bool Real)
m_isPeriodic = apply; m_isPeriodic = apply;
} }
void Aura::HandleModRegen(bool apply, bool Real) // eating void Aura::HandleModRegen(bool apply, bool /*Real*/) // eating
{ {
if(m_modifier.periodictime == 0) if(m_modifier.periodictime == 0)
m_modifier.periodictime = 5000; m_modifier.periodictime = 5000;
@ -4756,7 +4754,7 @@ void Aura::HandleModManaRegen(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateManaRegen(); ((Player*)m_target)->UpdateManaRegen();
} }
void Aura::HandleComprehendLanguage(bool apply, bool Real) void Aura::HandleComprehendLanguage(bool apply, bool /*Real*/)
{ {
if(apply) if(apply)
m_target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_COMPREHEND_LANG); m_target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_COMPREHEND_LANG);
@ -4799,7 +4797,7 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real)
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply); m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
} }
void Aura::HandleAuraModIncreaseMaxHealth(bool apply, bool Real) void Aura::HandleAuraModIncreaseMaxHealth(bool apply, bool /*Real*/)
{ {
uint32 oldhealth = m_target->GetHealth(); uint32 oldhealth = m_target->GetHealth();
double healthPercentage = (double)oldhealth / (double)m_target->GetMaxHealth(); double healthPercentage = (double)oldhealth / (double)m_target->GetMaxHealth();
@ -4817,7 +4815,7 @@ void Aura::HandleAuraModIncreaseMaxHealth(bool apply, bool Real)
} }
} }
void Aura::HandleAuraModIncreaseEnergy(bool apply, bool Real) void Aura::HandleAuraModIncreaseEnergy(bool apply, bool /*Real*/)
{ {
Powers powerType = m_target->getPowerType(); Powers powerType = m_target->getPowerType();
if(int32(powerType) != m_modifier.m_miscvalue) if(int32(powerType) != m_modifier.m_miscvalue)
@ -4853,7 +4851,7 @@ void Aura::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/)
/*** FIGHT ***/ /*** FIGHT ***/
/********************************/ /********************************/
void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real) void Aura::HandleAuraModParryPercent(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId()!=TYPEID_PLAYER) if(m_target->GetTypeId()!=TYPEID_PLAYER)
return; return;
@ -4861,7 +4859,7 @@ void Aura::HandleAuraModParryPercent(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateParryPercentage(); ((Player*)m_target)->UpdateParryPercentage();
} }
void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real) void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId()!=TYPEID_PLAYER) if(m_target->GetTypeId()!=TYPEID_PLAYER)
return; return;
@ -4870,7 +4868,7 @@ void Aura::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
//sLog.outError("BONUS DODGE CHANCE: + %f", float(m_modifier.m_amount)); //sLog.outError("BONUS DODGE CHANCE: + %f", float(m_modifier.m_amount));
} }
void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool Real) void Aura::HandleAuraModBlockPercent(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId()!=TYPEID_PLAYER) if(m_target->GetTypeId()!=TYPEID_PLAYER)
return; return;
@ -4920,7 +4918,7 @@ void Aura::HandleAuraModCritPercent(bool apply, bool Real)
} }
} }
void Aura::HandleModHitChance(bool apply, bool Real) void Aura::HandleModHitChance(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() == TYPEID_PLAYER) if(m_target->GetTypeId() == TYPEID_PLAYER)
{ {
@ -4934,7 +4932,7 @@ void Aura::HandleModHitChance(bool apply, bool Real)
} }
} }
void Aura::HandleModSpellHitChance(bool apply, bool Real) void Aura::HandleModSpellHitChance(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() == TYPEID_PLAYER) if(m_target->GetTypeId() == TYPEID_PLAYER)
{ {
@ -4980,19 +4978,19 @@ void Aura::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)
/*** ATTACK SPEED ***/ /*** ATTACK SPEED ***/
/********************************/ /********************************/
void Aura::HandleModCastingSpeed(bool apply, bool Real) void Aura::HandleModCastingSpeed(bool apply, bool /*Real*/)
{ {
m_target->ApplyCastTimePercentMod(m_modifier.m_amount,apply); m_target->ApplyCastTimePercentMod(m_modifier.m_amount,apply);
} }
void Aura::HandleModMeleeRangedSpeedPct(bool apply, bool Real) void Aura::HandleModMeleeRangedSpeedPct(bool apply, bool /*Real*/)
{ {
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply);
m_target->ApplyAttackTimePercentMod(OFF_ATTACK,m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(OFF_ATTACK,m_modifier.m_amount,apply);
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply); m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply);
} }
void Aura::HandleModCombatSpeedPct(bool apply, bool Real) void Aura::HandleModCombatSpeedPct(bool apply, bool /*Real*/)
{ {
m_target->ApplyCastTimePercentMod(m_modifier.m_amount,apply); m_target->ApplyCastTimePercentMod(m_modifier.m_amount,apply);
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply);
@ -5000,7 +4998,7 @@ void Aura::HandleModCombatSpeedPct(bool apply, bool Real)
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply); m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply);
} }
void Aura::HandleModAttackSpeed(bool apply, bool Real) void Aura::HandleModAttackSpeed(bool apply, bool /*Real*/)
{ {
if(!m_target->isAlive() ) if(!m_target->isAlive() )
return; return;
@ -5008,19 +5006,19 @@ void Aura::HandleModAttackSpeed(bool apply, bool Real)
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_modifier.m_amount,apply);
} }
void Aura::HandleHaste(bool apply, bool Real) void Aura::HandleHaste(bool apply, bool /*Real*/)
{ {
m_target->ApplyAttackTimePercentMod(BASE_ATTACK, m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(BASE_ATTACK, m_modifier.m_amount,apply);
m_target->ApplyAttackTimePercentMod(OFF_ATTACK, m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(OFF_ATTACK, m_modifier.m_amount,apply);
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK,m_modifier.m_amount,apply); m_target->ApplyAttackTimePercentMod(RANGED_ATTACK,m_modifier.m_amount,apply);
} }
void Aura::HandleAuraModRangedHaste(bool apply, bool Real) void Aura::HandleAuraModRangedHaste(bool apply, bool /*Real*/)
{ {
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply); m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_modifier.m_amount, apply);
} }
void Aura::HandleRangedAmmoHaste(bool apply, bool Real) void Aura::HandleRangedAmmoHaste(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -5031,12 +5029,12 @@ void Aura::HandleRangedAmmoHaste(bool apply, bool Real)
/*** ATTACK POWER ***/ /*** ATTACK POWER ***/
/********************************/ /********************************/
void Aura::HandleAuraModAttackPower(bool apply, bool Real) void Aura::HandleAuraModAttackPower(bool apply, bool /*Real*/)
{ {
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(m_modifier.m_amount), apply); m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(m_modifier.m_amount), apply);
} }
void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real) void Aura::HandleAuraModRangedAttackPower(bool apply, bool /*Real*/)
{ {
if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0) if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
return; return;
@ -5044,13 +5042,13 @@ void Aura::HandleAuraModRangedAttackPower(bool apply, bool Real)
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply); m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_modifier.m_amount), apply);
} }
void Aura::HandleAuraModAttackPowerPercent(bool apply, bool Real) void Aura::HandleAuraModAttackPowerPercent(bool apply, bool /*Real*/)
{ {
//UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1 //UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, float(m_modifier.m_amount), apply); m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, float(m_modifier.m_amount), apply);
} }
void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real) void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool /*Real*/)
{ {
if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0) if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
return; return;
@ -5059,7 +5057,7 @@ void Aura::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real)
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(m_modifier.m_amount), apply); m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(m_modifier.m_amount), apply);
} }
void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real) void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool /*apply*/, bool Real)
{ {
// spells required only Real aura add/remove // spells required only Real aura add/remove
if(!Real) if(!Real)
@ -5070,7 +5068,7 @@ void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
((Player*)m_target)->UpdateAttackPowerAndDamage(true); ((Player*)m_target)->UpdateAttackPowerAndDamage(true);
} }
void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real) void Aura::HandleAuraModAttackPowerOfStatPercent(bool /*apply*/, bool Real)
{ {
// spells required only Real aura add/remove // spells required only Real aura add/remove
if(!Real) if(!Real)
@ -5262,7 +5260,7 @@ void Aura::HandleModPowerCost(bool apply, bool Real)
m_target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,m_modifier.m_amount,apply); m_target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,m_modifier.m_amount,apply);
} }
void Aura::HandleNoReagentUseAura(bool Apply, bool Real) void Aura::HandleNoReagentUseAura(bool /*Apply*/, bool Real)
{ {
// spells required only Real aura add/remove // spells required only Real aura add/remove
if(!Real) if(!Real)
@ -5430,7 +5428,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
m_target->SetHealth(uint32(ceil((double)m_target->GetMaxHealth() * healthPercentage)));*/ m_target->SetHealth(uint32(ceil((double)m_target->GetMaxHealth() * healthPercentage)));*/
} }
void Aura::HandleAuraEmpathy(bool apply, bool Real) void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_UNIT) if(m_target->GetTypeId() != TYPEID_UNIT)
return; return;
@ -5440,7 +5438,7 @@ void Aura::HandleAuraEmpathy(bool apply, bool Real)
m_target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply); m_target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
} }
void Aura::HandleAuraUntrackable(bool apply, bool Real) void Aura::HandleAuraUntrackable(bool apply, bool /*Real*/)
{ {
if(apply) if(apply)
m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE); m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
@ -5448,7 +5446,7 @@ void Aura::HandleAuraUntrackable(bool apply, bool Real)
m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE); m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
} }
void Aura::HandleAuraModPacify(bool apply, bool Real) void Aura::HandleAuraModPacify(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -5465,7 +5463,7 @@ void Aura::HandleAuraModPacifyAndSilence(bool apply, bool Real)
HandleAuraModSilence(apply,Real); HandleAuraModSilence(apply,Real);
} }
void Aura::HandleAuraGhost(bool apply, bool Real) void Aura::HandleAuraGhost(bool apply, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -5535,7 +5533,7 @@ void Aura::HandleForceMoveForward(bool apply, bool Real)
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVE); m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVE);
} }
void Aura::HandleAuraModExpertise(bool /*apply*/, bool Real) void Aura::HandleAuraModExpertise(bool /*apply*/, bool /*Real*/)
{ {
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
@ -5560,7 +5558,7 @@ void Aura::HandleModTargetResistance(bool apply, bool Real)
m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply); m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_modifier.m_amount, apply);
} }
void Aura::HandleShieldBlockValue(bool apply, bool Real) void Aura::HandleShieldBlockValue(bool apply, bool /*Real*/)
{ {
BaseModType modType = FLAT_MOD; BaseModType modType = FLAT_MOD;
if(m_modifier.m_auraname == SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT) if(m_modifier.m_auraname == SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT)
@ -5959,14 +5957,9 @@ void Aura::PeriodicTick()
if( BattleGround *bg = ((Player*)pCaster)->GetBattleGround() ) if( BattleGround *bg = ((Player*)pCaster)->GetBattleGround() )
bg->UpdatePlayerScore(((Player*)pCaster), SCORE_HEALING_DONE, gain); bg->UpdatePlayerScore(((Player*)pCaster), SCORE_HEALING_DONE, gain);
//Do check before because m_modifier.auraName can be invalidate by DealDamage.
bool procSpell = (m_modifier.m_auraname == SPELL_AURA_PERIODIC_HEAL && m_target != pCaster);
m_target->getHostilRefManager().threatAssist(pCaster, float(gain) * 0.5f, GetSpellProto()); m_target->getHostilRefManager().threatAssist(pCaster, float(gain) * 0.5f, GetSpellProto());
Unit* target = m_target; // aura can be deleted in DealDamage
SpellEntry const* spellProto = GetSpellProto(); SpellEntry const* spellProto = GetSpellProto();
bool haveCastItem = GetCastItemGUID()!=0;
// heal for caster damage // heal for caster damage
if(m_target!=pCaster && spellProto->SpellVisual[0]==163) if(m_target!=pCaster && spellProto->SpellVisual[0]==163)
@ -5996,8 +5989,8 @@ void Aura::PeriodicTick()
} }
} }
uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HEAL; // uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HEAL;
uint32 procVictim = 0;//ROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_HEAL; // uint32 procVictim = 0;//ROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_HEAL;
// ignore item heals // ignore item heals
// if(procSpell && !haveCastItem) // if(procSpell && !haveCastItem)
// pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto); // pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto);
@ -6691,7 +6684,7 @@ void Aura::HandleArenaPreparation(bool apply, bool Real)
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION); m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION);
} }
void Aura::HandleAuraControlVehicle(bool apply, bool Real) void Aura::HandleAuraControlVehicle(bool /*apply*/, bool Real)
{ {
if(!Real) if(!Real)
return; return;

View file

@ -2156,7 +2156,6 @@ void Spell::EffectTeleportUnits(uint32 i)
return; return;
} }
// Init dest coordinates // Init dest coordinates
uint32 mapid = m_caster->GetMapId();
float x = m_targets.m_destX; float x = m_targets.m_destX;
float y = m_targets.m_destY; float y = m_targets.m_destY;
float z = m_targets.m_destZ; float z = m_targets.m_destZ;
@ -2558,7 +2557,7 @@ void Spell::EffectHealthLeech(uint32 i)
int32 new_damage = int32(damage*multiplier); int32 new_damage = int32(damage*multiplier);
uint32 curHealth = unitTarget->GetHealth(); uint32 curHealth = unitTarget->GetHealth();
new_damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, new_damage, m_IsTriggeredSpell, true); new_damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, new_damage );
if(curHealth < new_damage) if(curHealth < new_damage)
new_damage = curHealth; new_damage = curHealth;
@ -2925,6 +2924,8 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
// Don't return, let loots been taken // Don't return, let loots been taken
default:
break;
} }
} }
@ -3849,7 +3850,7 @@ void Spell::EffectEnchantItemPrismatic(uint32 effect_idx)
} }
if(!add_socket) if(!add_socket)
{ {
sLog.outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (u), not suppoted yet.", sLog.outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.",
m_spellInfo->Id,SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC,ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET); m_spellInfo->Id,SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC,ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET);
return; return;
} }
@ -4906,11 +4907,23 @@ void Spell::EffectScriptEffect(uint32 effIndex)
uint32 spellID = m_spellInfo->CalculateSimpleValue(0); uint32 spellID = m_spellInfo->CalculateSimpleValue(0);
uint32 questID = m_spellInfo->CalculateSimpleValue(1); uint32 questID = m_spellInfo->CalculateSimpleValue(1);
if( ((Player*)unitTarget)->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE && !((Player*)unitTarget)->GetQuestRewardStatus (questID) ) if (((Player*)unitTarget)->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE && !((Player*)unitTarget)->GetQuestRewardStatus (questID))
unitTarget->CastSpell(unitTarget, spellID, true); unitTarget->CastSpell(unitTarget, spellID, true);
return; return;
} }
case 59317: // Teleporting
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
// return from top
if (((Player*)unitTarget)->GetAreaId() == 4637)
unitTarget->CastSpell(unitTarget, 59316, true);
// teleport atop
else
unitTarget->CastSpell(unitTarget, 59314, true);
return;
// random spell learn instead placeholder // random spell learn instead placeholder
case 60893: // Northrend Alchemy Research case 60893: // Northrend Alchemy Research
case 61177: // Northrend Inscription Research case 61177: // Northrend Inscription Research
@ -5974,9 +5987,9 @@ void Spell::EffectSummonCritter(uint32 i)
critter->AIM_Initialize(); critter->AIM_Initialize();
critter->InitPetCreateSpells(); // e.g. disgusting oozeling has a create spell as critter... critter->InitPetCreateSpells(); // e.g. disgusting oozeling has a create spell as critter...
critter->SetMaxHealth(1); critter->SelectLevel(critter->GetCreatureInfo()); // some summoned creaters have different from 1 DB data for level/hp
critter->SetHealth(1); critter->SetUInt32Value(UNIT_NPC_FLAGS, critter->GetCreatureInfo()->npcflag);
critter->SetLevel(1); // some mini-pets have quests
// set timer for unsummon // set timer for unsummon
int32 duration = GetSpellDuration(m_spellInfo); int32 duration = GetSpellDuration(m_spellInfo);

View file

@ -502,6 +502,8 @@ bool IsSingleTargetSpell(SpellEntry const *spellInfo)
{ {
case SPELL_JUDGEMENT: case SPELL_JUDGEMENT:
return true; return true;
default:
break;
} }
// single target triggered spell. // single target triggered spell.
@ -531,6 +533,8 @@ bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellI
if(GetSpellSpecific(spellInfo2->Id) == spec1) if(GetSpellSpecific(spellInfo2->Id) == spec1)
return true; return true;
break; break;
default:
break;
} }
return false; return false;
@ -1136,12 +1140,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
case SPELLFAMILY_GENERIC: // same family case case SPELLFAMILY_GENERIC: // same family case
{ {
// Thunderfury // Thunderfury
if( spellInfo_1->Id == 21992 && spellInfo_2->Id == 27648 || spellInfo_2->Id == 21992 && spellInfo_1->Id == 27648 ) if ((spellInfo_1->Id == 21992 && spellInfo_2->Id == 27648) ||
(spellInfo_2->Id == 21992 && spellInfo_1->Id == 27648))
return false; return false;
// Lightning Speed (Mongoose) and Fury of the Crashing Waves (Tsunami Talisman) // Lightning Speed (Mongoose) and Fury of the Crashing Waves (Tsunami Talisman)
if( spellInfo_1->Id == 28093 && spellInfo_2->Id == 42084 || if ((spellInfo_1->Id == 28093 && spellInfo_2->Id == 42084) ||
spellInfo_2->Id == 28093 && spellInfo_1->Id == 42084 ) (spellInfo_2->Id == 28093 && spellInfo_1->Id == 42084))
return false; return false;
// Soulstone Resurrection and Twisting Nether (resurrector) // Soulstone Resurrection and Twisting Nether (resurrector)
@ -2789,6 +2794,8 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
case DIMINISHING_BANISH: case DIMINISHING_BANISH:
case DIMINISHING_LIMITONLY: case DIMINISHING_LIMITONLY:
return true; return true;
default:
return false;
} }
return false; return false;
} }
@ -2816,6 +2823,8 @@ DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group)
case DIMINISHING_WARLOCK_FEAR: case DIMINISHING_WARLOCK_FEAR:
case DIMINISHING_KNOCKOUT: case DIMINISHING_KNOCKOUT:
return DRTYPE_PLAYER; return DRTYPE_PLAYER;
default:
break;
} }
return DRTYPE_NONE; return DRTYPE_NONE;

View file

@ -318,8 +318,9 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
break; break;
} }
if( currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() || if ((currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat() && pAttacker->IsWithinDistInMap(target, ATTACK_DISTANCE) ) currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat()) &&
pAttacker->IsWithinDistInMap(target, ATTACK_DISTANCE))
{ //implement 110% threat rule for targets in melee range { //implement 110% threat rule for targets in melee range
found = true; //and 130% rule for targets in ranged distances found = true; //and 130% rule for targets in ranged distances
break; //for selecting alive targets break; //for selecting alive targets

View file

@ -980,7 +980,7 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const *spellInfo, boo
} }
// Obsolete func need remove, here only for comotability vs another patches // Obsolete func need remove, here only for comotability vs another patches
uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage, bool isTriggeredSpell, bool useSpellDamage) uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage)
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID); SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellID);
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, spellInfo->SchoolMask); SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, spellInfo->SchoolMask);
@ -2275,7 +2275,7 @@ void Unit::SendAttackStop(Unit* victim)
((Creature*)victim)->AI().EnterEvadeMode(this);*/ ((Creature*)victim)->AI().EnterEvadeMode(this);*/
} }
bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const *spellProto, WeaponAttackType attackType) bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const * /*spellProto*/, WeaponAttackType attackType)
{ {
if (pVictim->HasInArc(M_PI,this)) if (pVictim->HasInArc(M_PI,this))
{ {
@ -4352,7 +4352,7 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType,
SendMessageToSet( &data, true ); SendMessageToSet( &data, true );
} }
bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown) bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
{ {
SpellEntry const *hasteSpell = triggeredByAura->GetSpellProto(); SpellEntry const *hasteSpell = triggeredByAura->GetSpellProto();
@ -4662,7 +4662,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break; break;
} }
return false; return false;
}/**/ }*/
// Sunwell Exalted Caster Neck (Shattered Sun Pendant of Acumen neck) // Sunwell Exalted Caster Neck (Shattered Sun Pendant of Acumen neck)
// cast 45479 Light's Wrath if Exalted by Aldor // cast 45479 Light's Wrath if Exalted by Aldor
// cast 45429 Arcane Bolt if Exalted by Scryers // cast 45429 Arcane Bolt if Exalted by Scryers
@ -7326,24 +7326,28 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
if (HasFlag(UNIT_FIELD_AURASTATE,1<<(flag-1))) if (HasFlag(UNIT_FIELD_AURASTATE,1<<(flag-1)))
{ {
RemoveFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1)); RemoveFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1));
Unit::AuraMap& tAuras = GetAuras();
for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
{
SpellEntry const* spellProto = (*itr).second->GetSpellProto();
if (spellProto->CasterAuraState == flag)
{
// exceptions (applied at state but not removed at state change)
// Rampage
if(spellProto->SpellIconID==2006 && spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && spellProto->SpellFamilyFlags==0x100000)
{
++itr;
continue;
}
RemoveAura(itr); if (flag != AURA_STATE_ENRAGE) // enrage aura state triggering continues auras
{
Unit::AuraMap& tAuras = GetAuras();
for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
{
SpellEntry const* spellProto = (*itr).second->GetSpellProto();
if (spellProto->CasterAuraState == flag)
{
// exceptions (applied at state but not removed at state change)
// Rampage
if(spellProto->SpellIconID==2006 && spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && spellProto->SpellFamilyFlags==0x100000)
{
++itr;
continue;
}
RemoveAura(itr);
}
else
++itr;
} }
else
++itr;
} }
} }
} }
@ -9946,6 +9950,7 @@ Powers Unit::GetPowerTypeByAuraGroup(UnitMods unitMod) const
case UNIT_MOD_HAPPINESS: return POWER_HAPPINESS; case UNIT_MOD_HAPPINESS: return POWER_HAPPINESS;
case UNIT_MOD_RUNE: return POWER_RUNE; case UNIT_MOD_RUNE: return POWER_RUNE;
case UNIT_MOD_RUNIC_POWER:return POWER_RUNIC_POWER; case UNIT_MOD_RUNIC_POWER:return POWER_RUNIC_POWER;
default: return POWER_MANA;
} }
return POWER_MANA; return POWER_MANA;
@ -10169,6 +10174,8 @@ uint32 Unit::GetCreatePowers( Powers power ) const
case POWER_ENERGY: return 100; case POWER_ENERGY: return 100;
case POWER_HAPPINESS: return (GetTypeId()==TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 1050000); case POWER_HAPPINESS: return (GetTypeId()==TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 1050000);
case POWER_RUNIC_POWER: return 1000; case POWER_RUNIC_POWER: return 1000;
case POWER_RUNE: return 0;
case POWER_HEALTH: return 0;
} }
return 0; return 0;
@ -10581,7 +10588,6 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
Aura *triggeredByAura = i->triggeredByAura; Aura *triggeredByAura = i->triggeredByAura;
Modifier *auraModifier = triggeredByAura->GetModifier(); Modifier *auraModifier = triggeredByAura->GetModifier();
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto(); SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
uint32 effIndex = triggeredByAura->GetEffIndex();
bool useCharges = triggeredByAura->GetAuraCharges() > 0; bool useCharges = triggeredByAura->GetAuraCharges() > 0;
// For players set spell cooldown if need // For players set spell cooldown if need
uint32 cooldown = 0; uint32 cooldown = 0;

View file

@ -1085,7 +1085,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, bool critical = false); void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, bool critical = false);
void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage,Powers powertype); void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage,Powers powertype);
uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage, bool isTriggeredSpell = false, bool useSpellDamage = true); uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage);
void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0); void CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem = NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0); void CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);
void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0); void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, Aura* triggeredByAura = NULL, uint64 originalCaster = 0);

View file

@ -153,7 +153,7 @@ bool ChatHandler::HandleCharacterDeleteCommand(const char* args)
} }
/// Exit the realm /// Exit the realm
bool ChatHandler::HandleServerExitCommand(const char* args) bool ChatHandler::HandleServerExitCommand(const char* /*args*/)
{ {
SendSysMessage(LANG_COMMAND_EXIT); SendSysMessage(LANG_COMMAND_EXIT);
World::StopNow(SHUTDOWN_EXIT_CODE); World::StopNow(SHUTDOWN_EXIT_CODE);
@ -161,7 +161,7 @@ bool ChatHandler::HandleServerExitCommand(const char* args)
} }
/// Display info on users currently in the realm /// Display info on users currently in the realm
bool ChatHandler::HandleAccountOnlineListCommand(const char* args) bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/)
{ {
///- Get the list of accounts ID logged to the realm ///- Get the list of accounts ID logged to the realm
QueryResult *resultDB = CharacterDatabase.Query("SELECT name,account FROM characters WHERE online > 0"); QueryResult *resultDB = CharacterDatabase.Query("SELECT name,account FROM characters WHERE online > 0");

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7744" #define REVISION_NR "7768"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -233,7 +233,7 @@
AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib" AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib"
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll" OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;" AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_debug&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb" ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb"
SubSystem="2" SubSystem="2"
@ -316,7 +316,7 @@
AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib" AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib"
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll" OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;" AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_debug&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb" ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb"
SubSystem="2" SubSystem="2"

View file

@ -6,6 +6,7 @@
ProjectGUID="{A3A04E47-43A2-4C08-90B3-029CEF558594}" ProjectGUID="{A3A04E47-43A2-4C08-90B3-029CEF558594}"
RootNamespace="mangosd" RootNamespace="mangosd"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="0"
> >
<Platforms> <Platforms>
<Platform <Platform
@ -422,8 +423,8 @@
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug_NoPCH|Win32" Name="Debug_NoPCH|Win32"
OutputDirectory="$(ConfigurationName)" OutputDirectory=".\mangosd__$(PlatformName)_$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory=".\mangosd__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
@ -523,8 +524,8 @@
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug_NoPCH|x64" Name="Debug_NoPCH|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory=".\mangosd__$(PlatformName)_$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory=".\mangosd__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"

View file

@ -6,6 +6,7 @@
ProjectGUID="{4205C8A9-79B7-4354-8064-F05FB9CA0C96}" ProjectGUID="{4205C8A9-79B7-4354-8064-F05FB9CA0C96}"
RootNamespace="script" RootNamespace="script"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="0"
> >
<Platforms> <Platforms>
<Platform <Platform
@ -397,7 +398,7 @@
AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib" AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib"
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll" OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;" AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_debug&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb" ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb"
SubSystem="2" SubSystem="2"
@ -480,7 +481,7 @@
AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib" AdditionalDependencies="mangosd.lib zlib.lib zthread.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib"
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll" OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;" AdditionalLibraryDirectories="&quot;.\mangosd__$(PlatformName)_$(ConfigurationName)&quot;;&quot;..\..\dep\lib\$(PlatformName)_debug&quot;;&quot;.\zlib__$(PlatformName)_$(ConfigurationName)&quot;;&quot;.\zthread__$(PlatformName)_$(ConfigurationName)&quot;"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb" ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb"
SubSystem="2" SubSystem="2"

View file

@ -180,8 +180,8 @@ Global
{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64 {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.ActiveCfg = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.ActiveCfg = Debug|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.Build.0 = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.Build.0 = Debug|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.ActiveCfg = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.ActiveCfg = Debug|Win32

View file

@ -180,8 +180,8 @@ Global
{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64 {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release|x64.Build.0 = Release|x64
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|x64 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.ActiveCfg = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|x64 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug_NoPCH|x64.Build.0 = Debug_NoPCH|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.ActiveCfg = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.ActiveCfg = Debug|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.Build.0 = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.Build.0 = Debug|Win32
{803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.ActiveCfg = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.ActiveCfg = Debug|Win32