mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11973] Various Cleanups
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
c243c42c3c
commit
f3f3349661
50 changed files with 153 additions and 134 deletions
|
|
@ -313,7 +313,7 @@ void ArenaTeam::DelMember(ObjectGuid guid)
|
|||
}
|
||||
}
|
||||
|
||||
if(Player *player = sObjectMgr.GetPlayer(guid))
|
||||
if (Player* player = sObjectMgr.GetPlayer(guid))
|
||||
{
|
||||
player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);
|
||||
// delete all info regarding this team
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
|
|||
RemoveAItem(auction->itemGuidLow); // we have to remove the item, before we delete it !!
|
||||
auction->itemGuidLow = 0; // pending list will not use guid data
|
||||
|
||||
|
||||
// will delete item or place to receiver mail list
|
||||
MailDraft(msgAuctionWonSubject.str(), msgAuctionWonBody.str())
|
||||
.AddItem(pItem)
|
||||
|
|
@ -908,11 +907,13 @@ AuctionEntry* AuctionHouseObject::AddAuction(AuctionHouseEntry const* auctionHou
|
|||
sAuctionMgr.AddAItem(newItem);
|
||||
|
||||
CharacterDatabase.BeginTransaction();
|
||||
|
||||
newItem->SaveToDB();
|
||||
AH->SaveToDB();
|
||||
|
||||
if (pl)
|
||||
pl->SaveInventoryAndGoldToDB();
|
||||
|
||||
CharacterDatabase.CommitTransaction();
|
||||
|
||||
return AH;
|
||||
|
|
@ -1019,7 +1020,6 @@ bool AuctionEntry::UpdateBid(uint32 newbid, Player* newbidder /*=NULL*/)
|
|||
|
||||
if ((newbid < buyout) || (buyout == 0)) // bid
|
||||
{
|
||||
|
||||
if (auction_owner)
|
||||
auction_owner->GetSession()->SendAuctionOwnerNotification(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ struct AuctionEntry
|
|||
void SaveToDB() const;
|
||||
void AuctionBidWinning(Player* bidder = NULL);
|
||||
|
||||
|
||||
// -1,0,+1 order result
|
||||
int CompareAuctionEntry(uint32 column, const AuctionEntry *auc, Player* viewPlayer) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ enum BattleGroundSpells
|
|||
enum BattleGroundTimeIntervals
|
||||
{
|
||||
RESURRECTION_INTERVAL = 30000, // ms
|
||||
//REMIND_INTERVAL = 10000, // ms
|
||||
INVITATION_REMIND_TIME = 20000, // ms
|
||||
INVITE_ACCEPT_WAIT_TIME = 40000, // ms
|
||||
TIME_TO_AUTOREMOVE = 120000, // ms
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ void BattleGroundAV::UpdateScore(BattleGroundTeamIndex teamIdx, int32 points )
|
|||
void BattleGroundAV::Update(uint32 diff)
|
||||
{
|
||||
BattleGround::Update(diff);
|
||||
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ BattleGroundBE::BattleGroundBE()
|
|||
|
||||
BattleGroundBE::~BattleGroundBE()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BattleGroundBE::Update(uint32 diff)
|
||||
|
|
|
|||
|
|
@ -515,6 +515,7 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
|
|||
BattleGroundQueueTypeId bgQueueTypeId = _player->GetBattleGroundQueueTypeId(i);
|
||||
if (!bgQueueTypeId)
|
||||
continue;
|
||||
|
||||
BattleGroundTypeId bgTypeId = BattleGroundMgr::BGTemplateId(bgQueueTypeId);
|
||||
ArenaType arenaType = BattleGroundMgr::BGArenaType(bgQueueTypeId);
|
||||
if (bgTypeId == _player->GetBattleGroundTypeId())
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,7 @@ uint32 BattleGroundMgr::CreateBattleGround(BattleGroundTypeId bgTypeId, bool IsA
|
|||
case BATTLEGROUND_RV: bg = new BattleGroundRV; break;
|
||||
case BATTLEGROUND_IC: bg = new BattleGroundIC; break;
|
||||
case BATTLEGROUND_RB: bg = new BattleGroundRB; break;
|
||||
default:bg = new BattleGround; break; // placeholder for non implemented BG
|
||||
default: bg = new BattleGround; break; // placeholder for non implemented BG
|
||||
}
|
||||
|
||||
bg->SetMapId(MapID);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ BattleGroundRL::BattleGroundRL()
|
|||
|
||||
BattleGroundRL::~BattleGroundRL()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BattleGroundRL::Update(uint32 diff)
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ void WorldSession::HandleChannelSetOwnerOpcode(WorldPacket& recvPacket)
|
|||
{
|
||||
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
|
||||
std::string channelname, newp;
|
||||
recvPacket >> channelname;
|
||||
|
||||
|
|
|
|||
|
|
@ -259,8 +259,9 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
WorldPacket data;
|
||||
ChatHandler::FillMessageData(&data, this, type, lang, msg.c_str());
|
||||
group->BroadcastPacket(&data, false, group->GetMemberGroup(GetPlayer()->GetObjectGuid()));
|
||||
} break;
|
||||
|
||||
break;
|
||||
}
|
||||
case CHAT_MSG_GUILD:
|
||||
{
|
||||
std::string msg;
|
||||
|
|
@ -281,8 +282,9 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if (GetPlayer()->GetGuildId())
|
||||
if (Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId()))
|
||||
guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
|
||||
} break;
|
||||
|
||||
break;
|
||||
}
|
||||
case CHAT_MSG_OFFICER:
|
||||
{
|
||||
std::string msg;
|
||||
|
|
@ -303,8 +305,9 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if (GetPlayer()->GetGuildId())
|
||||
if (Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId()))
|
||||
guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
|
||||
} break;
|
||||
|
||||
break;
|
||||
}
|
||||
case CHAT_MSG_RAID:
|
||||
{
|
||||
std::string msg;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ void GameEventMgr::LoadFromDB()
|
|||
uint16 event_id = fields[0].GetUInt16();
|
||||
if (event_id == 0)
|
||||
{
|
||||
sLog.outErrorDb("`game_event` game event id (%i) is reserved and can't be used.",event_id);
|
||||
sLog.outErrorDb("`game_event` game event id (%i) is reserved and can't be used.", event_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,6 @@ void GameEventMgr::LoadFromDB()
|
|||
pGameEvent.length = fields[4].GetUInt32();
|
||||
pGameEvent.holiday_id = HolidayIds(fields[5].GetUInt32());
|
||||
|
||||
|
||||
if (pGameEvent.length == 0) // length>0 is validity check
|
||||
{
|
||||
sLog.outErrorDb("`game_event` game event id (%i) have length 0 and can't be used.", event_id);
|
||||
|
|
@ -173,7 +172,7 @@ void GameEventMgr::LoadFromDB()
|
|||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %u game events", count );
|
||||
sLog.outString(">> Loaded %u game events", count);
|
||||
}
|
||||
|
||||
std::map<uint16,int16> pool2event; // for check unique spawn event associated with pool
|
||||
|
|
|
|||
|
|
@ -1169,7 +1169,6 @@ void GameObject::Use(Unit* user)
|
|||
}
|
||||
|
||||
player->RewardPlayerAndGroupAtCast(this);
|
||||
|
||||
}
|
||||
|
||||
if (scriptReturnValue)
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ bool Group::Create(ObjectGuid guid, const char * name)
|
|||
CharacterDatabase.BeginTransaction();
|
||||
CharacterDatabase.PExecute("DELETE FROM groups WHERE groupId ='%u'", m_Id);
|
||||
CharacterDatabase.PExecute("DELETE FROM group_member WHERE groupId ='%u'", m_Id);
|
||||
|
||||
CharacterDatabase.PExecute("INSERT INTO groups (groupId,leaderGuid,mainTank,mainAssistant,lootMethod,looterGuid,lootThreshold,icon1,icon2,icon3,icon4,icon5,icon6,icon7,icon8,groupType,difficulty,raiddifficulty) "
|
||||
"VALUES ('%u','%u','%u','%u','%u','%u','%u','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','" UI64FMTD "','%u','%u','%u')",
|
||||
m_Id, m_leaderGuid.GetCounter(), m_mainTankGuid.GetCounter(), m_mainAssistantGuid.GetCounter(), uint32(m_lootMethod),
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ struct ItemPrototype
|
|||
uint32 GemProperties; // id from GemProperties.dbc
|
||||
int32 RequiredDisenchantSkill;
|
||||
float ArmorDamageModifier;
|
||||
uint32 Duration; // negative = realtime, positive = ingame time
|
||||
uint32 Duration;
|
||||
uint32 ItemLimitCategory; // id from ItemLimitCategory.dbc
|
||||
uint32 HolidayId; // id from Holidays.dbc
|
||||
uint32 ScriptId;
|
||||
|
|
|
|||
|
|
@ -788,9 +788,7 @@ enum MangosStrings
|
|||
LANG_BG_AV_H_NEAR_LOSE = 788,
|
||||
LANG_BG_AV_H_GENERAL_DEAD = 789,
|
||||
LANG_BG_AV_A_GENERAL_DEAD = 790,
|
||||
|
||||
|
||||
// Room for batleground/arena strings 791-799 not used
|
||||
// Room for battleground/arena strings 791-799 not used
|
||||
|
||||
// in game strings
|
||||
// = 800, not used
|
||||
|
|
|
|||
|
|
@ -245,8 +245,6 @@ bool ChatHandler::HandleGMVisibleCommand(char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ChatHandler::HandleGPSCommand(char* args)
|
||||
{
|
||||
WorldObject *obj = NULL;
|
||||
|
|
|
|||
|
|
@ -2221,10 +2221,11 @@ bool ChatHandler::HandleNpcUnFollowCommand(char* /*args*/)
|
|||
bool ChatHandler::HandleNpcTameCommand(char* /*args*/)
|
||||
{
|
||||
Creature *creatureTarget = getSelectedCreature ();
|
||||
if (!creatureTarget || creatureTarget->IsPet ())
|
||||
|
||||
if (!creatureTarget || creatureTarget->IsPet())
|
||||
{
|
||||
PSendSysMessage (LANG_SELECT_CREATURE);
|
||||
SetSentErrorMessage (true);
|
||||
PSendSysMessage(LANG_SELECT_CREATURE);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4365,7 +4365,7 @@ bool ChatHandler::HandleExploreCheatCommand(char* args)
|
|||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING,GetNameLink().c_str());
|
||||
}
|
||||
|
||||
for (uint8 i=0; i<PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
for (uint8 i=0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
{
|
||||
if (flag != 0)
|
||||
{
|
||||
|
|
@ -4515,7 +4515,7 @@ bool ChatHandler::HandleShowAreaCommand(char* args)
|
|||
int offset = area / 32;
|
||||
uint32 val = (uint32)(1 << (area % 32));
|
||||
|
||||
if(area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
{
|
||||
SendSysMessage(LANG_BAD_VALUE);
|
||||
SetSentErrorMessage(true);
|
||||
|
|
@ -5076,6 +5076,7 @@ bool ChatHandler::HandleResetSpecsCommand(char* args)
|
|||
{
|
||||
target->resetTalents(true,true);
|
||||
target->SendTalentsInfoData(false);
|
||||
|
||||
ChatHandler(target).SendSysMessage(LANG_RESET_TALENTS);
|
||||
if (!m_session || m_session->GetPlayer() != target)
|
||||
PSendSysMessage(LANG_RESET_TALENTS_ONLINE,GetNameLink(target).c_str());
|
||||
|
|
@ -6119,6 +6120,7 @@ bool ChatHandler::HandleMovegensCommand(char* /*args*/)
|
|||
case RANDOM_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_RANDOM); break;
|
||||
case WAYPOINT_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_WAYPOINT); break;
|
||||
case CONFUSED_MOTION_TYPE: SendSysMessage(LANG_MOVEGENS_CONFUSED); break;
|
||||
|
||||
case CHASE_MOTION_TYPE:
|
||||
{
|
||||
Unit* target = NULL;
|
||||
|
|
@ -6510,7 +6512,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(char* args)
|
|||
++itr;
|
||||
continue;
|
||||
}
|
||||
if(itr->first != player->GetMapId())
|
||||
if (itr->first != player->GetMapId())
|
||||
{
|
||||
DungeonPersistentState *save = itr->second.state;
|
||||
std::string timeleft = secsToTimeString(save->GetResetTime() - time(NULL), true);
|
||||
|
|
@ -6531,6 +6533,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(char* args)
|
|||
}
|
||||
}
|
||||
PSendSysMessage("instances unbound: %d", counter);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -556,6 +556,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data )
|
|||
else
|
||||
pl->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_EQUIP_ERROR, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the packet sent by the client when taking money from the mail.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -319,7 +319,6 @@ class DungeonResetScheduler
|
|||
private: // fields
|
||||
MapPersistentStateManager& m_InstanceSaves;
|
||||
|
||||
|
||||
// fast lookup for reset times (always use existing functions for access/set)
|
||||
typedef UNORDERED_MAP<uint32 /*PAIR32(map,difficulty)*/,time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
|
||||
ResetTimeByMapDifficultyMap m_resetTimeByMapDifficulty;
|
||||
|
|
|
|||
|
|
@ -296,6 +296,7 @@ void WorldSession::HandleForceSpeedChangeAckOpcodes(WorldPacket &recv_data)
|
|||
{
|
||||
uint32 opcode = recv_data.GetOpcode();
|
||||
DEBUG_LOG("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
|
||||
|
||||
/* extract packet */
|
||||
ObjectGuid guid;
|
||||
MovementInfo movementInfo;
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ void WorldSession::SendTrainerList(ObjectGuid guid)
|
|||
static void SendTrainerSpellHelper(WorldPacket& data, TrainerSpell const* tSpell, TrainerSpellState state, float fDiscountMod, bool can_learn_primary_prof, uint32 reqLevel)
|
||||
{
|
||||
bool primary_prof_first_rank = sSpellMgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell);
|
||||
|
||||
SpellChainNode const* chain_node = sSpellMgr.GetSpellChainNode(tSpell->learnedSpell);
|
||||
|
||||
data << uint32(tSpell->spell); // learned spell (or cast-spell in profession case)
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ void WorldObject::Relocate(float x, float y, float z, float orientation)
|
|||
m_position.z = z;
|
||||
m_position.o = orientation;
|
||||
|
||||
if(isType(TYPEMASK_UNIT))
|
||||
if (isType(TYPEMASK_UNIT))
|
||||
((Unit*)this)->m_movementInfo.ChangePosition(x, y, z, orientation);
|
||||
}
|
||||
|
||||
|
|
@ -969,7 +969,7 @@ void WorldObject::Relocate(float x, float y, float z)
|
|||
m_position.y = y;
|
||||
m_position.z = z;
|
||||
|
||||
if(isType(TYPEMASK_UNIT))
|
||||
if (isType(TYPEMASK_UNIT))
|
||||
((Unit*)this)->m_movementInfo.ChangePosition(x, y, z, GetOrientation());
|
||||
}
|
||||
|
||||
|
|
@ -977,7 +977,7 @@ void WorldObject::SetOrientation(float orientation)
|
|||
{
|
||||
m_position.o = orientation;
|
||||
|
||||
if(isType(TYPEMASK_UNIT))
|
||||
if (isType(TYPEMASK_UNIT))
|
||||
((Unit*)this)->m_movementInfo.ChangeOrientation(orientation);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ ObjectAccessor::ConvertCorpseForPlayer(ObjectGuid player_guid, bool insignia)
|
|||
// remove resurrectable corpse from grid object registry (loaded state checked into call)
|
||||
// do not load the map if it's not loaded
|
||||
Map *map = sMapMgr.FindMap(corpse->GetMapId(), corpse->GetInstanceId());
|
||||
if(map)
|
||||
if (map)
|
||||
map->Remove(corpse, false);
|
||||
|
||||
// remove corpse from DB
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
|||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %lu points_of_interest locale strings", (unsigned long)mPointOfInterestLocaleMap.size() );
|
||||
sLog.outString(">> Loaded " SIZEFMTD " points_of_interest locale strings", mPointOfInterestLocaleMap.size());
|
||||
}
|
||||
|
||||
struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader>
|
||||
|
|
@ -853,7 +853,6 @@ void ObjectMgr::LoadEquipmentTemplates()
|
|||
continue;
|
||||
|
||||
ItemEntry const *dbcitem = sItemStore.LookupEntry(eqInfo->equipentry[j]);
|
||||
|
||||
if (!dbcitem)
|
||||
{
|
||||
sLog.outErrorDb("Unknown item (entry=%u) in creature_equip_template.equipentry%u for entry = %u, forced to 0.", eqInfo->equipentry[j], j+1, i);
|
||||
|
|
@ -877,6 +876,7 @@ void ObjectMgr::LoadEquipmentTemplates()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
sLog.outString( ">> Loaded %u equipment template", sEquipmentStorage.RecordCount );
|
||||
sLog.outString();
|
||||
}
|
||||
|
|
@ -5667,14 +5667,14 @@ void ObjectMgr::PackGroupIds()
|
|||
|
||||
void ObjectMgr::SetHighestGuids()
|
||||
{
|
||||
QueryResult *result = CharacterDatabase.Query( "SELECT MAX(guid) FROM characters" );
|
||||
QueryResult *result = CharacterDatabase.Query("SELECT MAX(guid) FROM characters");
|
||||
if( result )
|
||||
{
|
||||
m_CharGuids.Set((*result)[0].GetUInt32()+1);
|
||||
delete result;
|
||||
}
|
||||
|
||||
result = WorldDatabase.Query( "SELECT MAX(guid) FROM creature" );
|
||||
result = WorldDatabase.Query("SELECT MAX(guid) FROM creature");
|
||||
if( result )
|
||||
{
|
||||
m_FirstTemporaryCreatureGuid = (*result)[0].GetUInt32()+1;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
/// Correspondence between opcodes and their names
|
||||
OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
{ /*thread-safe*/
|
||||
{
|
||||
/*0x000*/ { "MSG_NULL_ACTION", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
/*0x001*/ { "CMSG_BOOTME", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
/*0x002*/ { "CMSG_DBLOOKUP", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
|
|
|
|||
|
|
@ -440,7 +440,6 @@ void Pet::SavePetToDB(PetSaveMode mode)
|
|||
savePet.Execute();
|
||||
CharacterDatabase.CommitTransaction();
|
||||
}
|
||||
// delete
|
||||
else
|
||||
{
|
||||
RemoveAllAuras(AURA_REMOVE_BY_DELETE);
|
||||
|
|
@ -1692,7 +1691,6 @@ bool Pet::removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Pet::CleanupActionBar()
|
||||
{
|
||||
for(int i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
|
||||
|
|
|
|||
|
|
@ -460,6 +460,7 @@ Player::Player (WorldSession *session): Unit(), m_mover(this), m_camera(this), m
|
|||
|
||||
m_MirrorTimerFlags = UNDERWATER_NONE;
|
||||
m_MirrorTimerFlagsLast = UNDERWATER_NONE;
|
||||
|
||||
m_isInWater = false;
|
||||
m_drunkTimer = 0;
|
||||
m_drunk = 0;
|
||||
|
|
@ -1011,7 +1012,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
m_MirrorTimer[BREATH_TIMER] = getMaxTimer(BREATH_TIMER);
|
||||
SendMirrorTimer(BREATH_TIMER, m_MirrorTimer[BREATH_TIMER], m_MirrorTimer[BREATH_TIMER], -1);
|
||||
}
|
||||
else // If activated - do tick
|
||||
else
|
||||
{
|
||||
m_MirrorTimer[BREATH_TIMER]-=time_diff;
|
||||
// Timer limit - need deal damage
|
||||
|
|
@ -9767,7 +9768,7 @@ InventoryResult Player::_CanStoreItem_InBag( uint8 bag, ItemPosCountVec &dest, I
|
|||
if (res != EQUIP_ERR_OK)
|
||||
continue;
|
||||
|
||||
// descrease at current stacksize
|
||||
// decrease at current stacksize
|
||||
need_space -= pItem2->GetCount();
|
||||
}
|
||||
|
||||
|
|
@ -11102,6 +11103,7 @@ Item* Player::StoreItem( ItemPosCountVec const& dest, Item* pItem, bool update )
|
|||
|
||||
Item* lastItem = pItem;
|
||||
uint32 entry = pItem->GetEntry();
|
||||
|
||||
for(ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
|
||||
{
|
||||
uint16 pos = itr->pos;
|
||||
|
|
@ -11117,6 +11119,7 @@ Item* Player::StoreItem( ItemPosCountVec const& dest, Item* pItem, bool update )
|
|||
|
||||
lastItem = _StoreItem(pos,pItem,count,true,update);
|
||||
}
|
||||
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, entry);
|
||||
return lastItem;
|
||||
}
|
||||
|
|
@ -12599,6 +12602,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
|
|||
HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
|
||||
break;
|
||||
case ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL:
|
||||
{
|
||||
if (enchant_spell_id)
|
||||
{
|
||||
if (apply)
|
||||
|
|
@ -12631,6 +12635,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
|
|||
RemoveAurasDueToItemSpell(item, enchant_spell_id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ITEM_ENCHANTMENT_TYPE_RESISTANCE:
|
||||
if (!enchant_amount)
|
||||
{
|
||||
|
|
@ -13248,6 +13253,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
|
|||
PlayerTalkClass->CloseGossip();
|
||||
TalkedToCreature(pSource->GetEntry(), pSource->GetObjectGuid());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case GOSSIP_OPTION_SPIRITHEALER:
|
||||
|
|
@ -14831,6 +14837,7 @@ void Player::KilledMonsterCredit( uint32 entry, ObjectGuid guid )
|
|||
{
|
||||
uint32 addkillcount = 1;
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, entry, addkillcount);
|
||||
|
||||
for( int i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
|
||||
{
|
||||
uint32 questid = GetQuestSlotQuestId(i);
|
||||
|
|
@ -19490,7 +19497,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
|
|||
{
|
||||
if (ItemPrototype const* proto = ObjectMgr::GetItemPrototype(itemId))
|
||||
{
|
||||
for(int idx = 0; idx < 5; ++idx)
|
||||
for(int idx = 0; idx < MAX_ITEM_PROTO_SPELLS; ++idx)
|
||||
{
|
||||
if (proto->Spells[idx].SpellId == spellInfo->Id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -702,6 +702,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
|||
break;
|
||||
}
|
||||
case DTT_EQSET_TABLE:
|
||||
{
|
||||
if (!changenth(line, 1, newguid)) // character_equipmentsets.guid update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
if (!changeGuid(line, 2, eqsets, sObjectMgr.m_EquipmentSetIds.GetNextAfterMaxUsed()))
|
||||
|
|
@ -710,7 +711,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
|||
if(!changeGuid(line, 6+i, items, sObjectMgr.m_ItemGuids.GetNextAfterMaxUsed()))
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
sLog.outError("Unknown dump table type: %u",type);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ void Spell::FillTargetMap()
|
|||
}
|
||||
break;
|
||||
}
|
||||
} // End new target combination fill
|
||||
}
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
@ -834,7 +834,7 @@ void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
|||
if (targetGUID == ihit->targetGUID) // Found in list
|
||||
{
|
||||
if (!immuned)
|
||||
ihit->effectMask |= (1 << effIndex); // Add only effect mask if not immuned
|
||||
ihit->effectMask |= 1 << effIndex; // Add only effect mask if not immuned
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1997,6 +1997,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
MaNGOS::UnitListSearcher<MaNGOS::AnyAoEVisibleTargetUnitInObjectRangeCheck> searcher(tempTargetUnitMap, u_check);
|
||||
Cell::VisitAllObjects(m_caster, searcher, max_range);
|
||||
}
|
||||
|
||||
if (tempTargetUnitMap.empty())
|
||||
break;
|
||||
|
||||
|
|
@ -2012,18 +2013,21 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
|
||||
while (t && next != tempTargetUnitMap.end())
|
||||
{
|
||||
if (!prev->IsWithinDist (*next,CHAIN_SPELL_JUMP_RADIUS))
|
||||
if (!prev->IsWithinDist(*next,CHAIN_SPELL_JUMP_RADIUS))
|
||||
break;
|
||||
if (!prev->IsWithinLOSInMap (*next))
|
||||
|
||||
if (!prev->IsWithinLOSInMap(*next))
|
||||
{
|
||||
++next;
|
||||
continue;
|
||||
}
|
||||
|
||||
prev = *next;
|
||||
targetUnitMap.push_back(prev);
|
||||
tempTargetUnitMap.erase(next);
|
||||
tempTargetUnitMap.sort(TargetDistanceOrderNear(prev));
|
||||
next = tempTargetUnitMap.begin();
|
||||
|
||||
--t;
|
||||
}
|
||||
}
|
||||
|
|
@ -2906,7 +2910,6 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
targetUnitMap.push_back(owner);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -4066,7 +4069,7 @@ void Spell::WriteAmmoToPacket(WorldPacket* data)
|
|||
break;
|
||||
}
|
||||
|
||||
if(ammoDisplayID)
|
||||
if (ammoDisplayID)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -4549,7 +4552,7 @@ void Spell::TakeReagents()
|
|||
return;
|
||||
|
||||
Player* p_caster = (Player*)m_caster;
|
||||
if (p_caster->CanNoReagentCast(m_spellInfo) )
|
||||
if (p_caster->CanNoReagentCast(m_spellInfo))
|
||||
return;
|
||||
|
||||
for(uint32 x = 0; x < MAX_SPELL_REAGENTS; ++x)
|
||||
|
|
@ -6296,6 +6299,7 @@ SpellCastResult Spell::CheckPower()
|
|||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
// Check valid power type
|
||||
if (m_spellInfo->powerType >= MAX_POWERS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -343,7 +343,6 @@ class Spell
|
|||
void EffectKillCreditGroup(SpellEffectIndex eff_idx);
|
||||
void EffectQuestFail(SpellEffectIndex eff_idx);
|
||||
void EffectActivateRune(SpellEffectIndex eff_idx);
|
||||
|
||||
void EffectTeachTaxiNode(SpellEffectIndex eff_idx);
|
||||
void EffectTitanGrip(SpellEffectIndex eff_idx);
|
||||
void EffectEnchantItemPrismatic(SpellEffectIndex eff_idx);
|
||||
|
|
|
|||
|
|
@ -1047,6 +1047,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||
entry->EffectSpellClassMask[GetEffIndex()].Flags = UI64LIT(0x0000000000200000);
|
||||
}
|
||||
}
|
||||
|
||||
((Player*)GetTarget())->AddSpellMod(this, apply);
|
||||
|
||||
ReapplyAffectedPassiveAuras();
|
||||
|
|
@ -3067,6 +3068,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
}
|
||||
break;
|
||||
case SPELLFAMILY_HUNTER:
|
||||
{
|
||||
switch(GetId())
|
||||
{
|
||||
case 34477: // Misdirection, main spell
|
||||
|
|
@ -3083,6 +3085,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
switch(GetId())
|
||||
{
|
||||
|
|
@ -4935,7 +4938,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool apply, bool Real)
|
|||
if(!Real)
|
||||
return;
|
||||
|
||||
Unit *target = GetTarget();
|
||||
Unit* target = GetTarget();
|
||||
|
||||
if (apply)
|
||||
{
|
||||
|
|
@ -5437,10 +5440,10 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
|||
// Rip
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x000000000000800000))
|
||||
{
|
||||
// 0.01*$AP*cp
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||
break;
|
||||
|
||||
// 0.01*$AP*cp
|
||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||
|
||||
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
|
||||
|
|
@ -8865,7 +8868,8 @@ void SpellAuraHolder::_RemoveSpellAuraHolder()
|
|||
break;
|
||||
}
|
||||
}
|
||||
// this was last holder
|
||||
|
||||
// this has been last aura
|
||||
if(!found)
|
||||
m_target->ModifyAuraState(AuraState(removeState), false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,7 +243,6 @@ class MANGOS_DLL_SPEC Aura
|
|||
void HandleAuraFeatherFall(bool Apply, bool Real);
|
||||
void HandleAuraHover(bool Apply, bool Real);
|
||||
void HandleAddModifier(bool Apply, bool Real);
|
||||
|
||||
void HandleAuraModStun(bool Apply, bool Real);
|
||||
void HandleModDamageDone(bool Apply, bool Real);
|
||||
void HandleAuraUntrackable(bool Apply, bool Real);
|
||||
|
|
|
|||
|
|
@ -590,6 +590,7 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
|
|||
// Lookup for Deadly poison (only attacker applied)
|
||||
Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_ROGUE &&
|
||||
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x10000)) &&
|
||||
(*itr)->GetCasterGuid() == m_caster->GetObjectGuid())
|
||||
|
|
@ -597,6 +598,7 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
|
|||
poison = *itr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// count consumed deadly poison doses at target
|
||||
if (poison)
|
||||
{
|
||||
|
|
@ -2699,7 +2701,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
|||
{
|
||||
if (!unitTarget)
|
||||
return;
|
||||
m_caster->CastSpell(unitTarget, 21887, true);// spell mod
|
||||
m_caster->CastSpell(unitTarget, 21887, true); // spell mod
|
||||
return;
|
||||
}
|
||||
// Last Stand
|
||||
|
|
@ -3175,6 +3177,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
|||
{
|
||||
if (!unitTarget || unitTarget->getPowerType() != POWER_MANA)
|
||||
return;
|
||||
|
||||
// Glyph of Mana Tide
|
||||
if (Unit *owner = m_caster->GetOwner())
|
||||
if (Aura *dummy = owner->GetDummyAura(55441))
|
||||
|
|
@ -4204,10 +4207,10 @@ void Spell::DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype)
|
|||
ItemPosCountVec dest;
|
||||
uint32 no_space = 0;
|
||||
InventoryResult msg = player->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, newitemid, num_to_add, &no_space );
|
||||
if( msg != EQUIP_ERR_OK )
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
// convert to possible store amount
|
||||
if( msg == EQUIP_ERR_INVENTORY_FULL || msg == EQUIP_ERR_CANT_CARRY_MORE_OF_THIS )
|
||||
if (msg == EQUIP_ERR_INVENTORY_FULL || msg == EQUIP_ERR_CANT_CARRY_MORE_OF_THIS)
|
||||
num_to_add -= no_space;
|
||||
else
|
||||
{
|
||||
|
|
@ -4234,7 +4237,7 @@ void Spell::DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype)
|
|||
}
|
||||
|
||||
// set the "Crafted by ..." property of the item
|
||||
if( pItem->GetProto()->Class != ITEM_CLASS_CONSUMABLE && pItem->GetProto()->Class != ITEM_CLASS_QUEST)
|
||||
if (pItem->GetProto()->Class != ITEM_CLASS_CONSUMABLE && pItem->GetProto()->Class != ITEM_CLASS_QUEST)
|
||||
pItem->SetGuidValue(ITEM_FIELD_CREATOR, player->GetObjectGuid());
|
||||
|
||||
// send info to the client
|
||||
|
|
@ -6544,7 +6547,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
|||
|
||||
// check presence
|
||||
for(int j = 0; j < 4; ++j)
|
||||
if(unitTarget->HasAura(spells[j], EFFECT_INDEX_0))
|
||||
if (unitTarget->HasAura(spells[j], EFFECT_INDEX_0))
|
||||
return;
|
||||
|
||||
// cast
|
||||
|
|
@ -7946,6 +7949,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
|||
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_POTION:
|
||||
{
|
||||
|
|
@ -8593,10 +8597,10 @@ void Spell::EffectLeapForward(SpellEffectIndex eff_idx)
|
|||
|
||||
void Spell::EffectLeapBack(SpellEffectIndex eff_idx)
|
||||
{
|
||||
if(unitTarget->IsTaxiFlying())
|
||||
if (unitTarget->IsTaxiFlying())
|
||||
return;
|
||||
|
||||
m_caster->KnockBackFrom(unitTarget,float(m_spellInfo->EffectMiscValue[eff_idx])/10,float(damage)/10);
|
||||
m_caster->KnockBackFrom(unitTarget, float(m_spellInfo->EffectMiscValue[eff_idx])/10, float(damage)/10);
|
||||
}
|
||||
|
||||
void Spell::EffectReputation(SpellEffectIndex eff_idx)
|
||||
|
|
@ -8827,10 +8831,10 @@ void Spell::DoSummonCritter(SpellEffectIndex eff_idx, uint32 forceFaction)
|
|||
|
||||
void Spell::EffectKnockBack(SpellEffectIndex eff_idx)
|
||||
{
|
||||
if(!unitTarget)
|
||||
if (!unitTarget)
|
||||
return;
|
||||
|
||||
unitTarget->KnockBackFrom(m_caster,float(m_spellInfo->EffectMiscValue[eff_idx])/10,float(damage)/10);
|
||||
unitTarget->KnockBackFrom(m_caster, float(m_spellInfo->EffectMiscValue[eff_idx])/10, float(damage)/10);
|
||||
}
|
||||
|
||||
void Spell::EffectSendTaxi(SpellEffectIndex eff_idx)
|
||||
|
|
@ -8843,14 +8847,14 @@ void Spell::EffectSendTaxi(SpellEffectIndex eff_idx)
|
|||
|
||||
void Spell::EffectPlayerPull(SpellEffectIndex eff_idx)
|
||||
{
|
||||
if(!unitTarget)
|
||||
if (!unitTarget)
|
||||
return;
|
||||
|
||||
float dist = unitTarget->GetDistance2d(m_caster);
|
||||
if (damage && dist > damage)
|
||||
dist = float(damage);
|
||||
|
||||
unitTarget->KnockBackFrom(m_caster,-dist,float(m_spellInfo->EffectMiscValue[eff_idx])/10);
|
||||
unitTarget->KnockBackFrom(m_caster, -dist, float(m_spellInfo->EffectMiscValue[eff_idx])/10);
|
||||
}
|
||||
|
||||
void Spell::EffectDispelMechanic(SpellEffectIndex eff_idx)
|
||||
|
|
|
|||
|
|
@ -285,7 +285,6 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
|
||||
GameObject *obj = GetPlayer()->GetMap()->GetGameObject(guid);
|
||||
|
||||
if(!obj)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -1309,7 +1309,7 @@ void SpellMgr::LoadSpellProcEvents()
|
|||
spe.schoolMask = fields[1].GetUInt32();
|
||||
spe.spellFamilyName = fields[2].GetUInt32();
|
||||
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
{
|
||||
spe.spellFamilyMask[i] = ClassFamilyMask(
|
||||
(uint64)fields[i+3].GetUInt32() | ((uint64)fields[i+6].GetUInt32()<<32),
|
||||
|
|
@ -1594,7 +1594,7 @@ void SpellMgr::LoadSpellBonuses()
|
|||
|
||||
// also add to high ranks
|
||||
DoSpellBonuses worker(mSpellBonusMap, sbe);
|
||||
doForHighRanks(entry,worker);
|
||||
doForHighRanks(entry, worker);
|
||||
|
||||
++count;
|
||||
|
||||
|
|
@ -1920,7 +1920,6 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if (spellInfo_1->SpellIconID == 3176 && spellInfo_2->SpellIconID == 3176)
|
||||
return false;
|
||||
|
||||
|
||||
// Brood Affliction: Bronze
|
||||
if ((spellInfo_1->Id == 23170 && spellInfo_2->Id == 23171) ||
|
||||
(spellInfo_2->Id == 23170 && spellInfo_1->Id == 23171))
|
||||
|
|
@ -2175,6 +2174,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if (((spellInfo_1->SpellFamilyFlags & UI64LIT(0x200000)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x8000))) ||
|
||||
((spellInfo_2->SpellFamilyFlags & UI64LIT(0x200000)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x8000))))
|
||||
return false;
|
||||
|
||||
// Dispersion
|
||||
if ((spellInfo_1->Id == 47585 && spellInfo_2->Id == 60069) ||
|
||||
(spellInfo_2->Id == 47585 && spellInfo_1->Id == 60069))
|
||||
|
|
|
|||
|
|
@ -1420,8 +1420,8 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
|
|||
// Add melee damage bonus
|
||||
damage = MeleeDamageBonusDone(damageInfo->target, damage, damageInfo->attackType);
|
||||
damage = damageInfo->target->MeleeDamageBonusTaken(this, damage, damageInfo->attackType);
|
||||
// Calculate armor reduction
|
||||
|
||||
// Calculate armor reduction
|
||||
uint32 armor_affected_damage = CalcNotIgnoreDamageReduction(damage, damageInfo->damageSchoolMask);
|
||||
damageInfo->damage = damage - armor_affected_damage + CalcArmorReducedDamage(damageInfo->target, armor_affected_damage);
|
||||
damageInfo->cleanDamage += damage - damageInfo->damage;
|
||||
|
|
@ -2226,7 +2226,6 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
reflectTriggeredBy->SetInUse(false); // free lock from deletion
|
||||
}
|
||||
|
||||
|
||||
// absorb by mana cost
|
||||
AuraList const& vManaShield = GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
||||
for(AuraList::const_iterator i = vManaShield.begin(), next; i != vManaShield.end() && RemainingDamage > 0; i = next)
|
||||
|
|
@ -4052,7 +4051,6 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder *holder)
|
|||
|
||||
if(stop)
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4365,7 +4363,7 @@ void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount
|
|||
{
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
||||
|
||||
// Custom dispel cases
|
||||
// Custom dispel case
|
||||
// Unstable Affliction
|
||||
if(spellEntry->SpellFamilyName == SPELLFAMILY_WARLOCK && (spellEntry->SpellFamilyFlags & UI64LIT(0x010000000000)))
|
||||
{
|
||||
|
|
@ -6250,13 +6248,13 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u
|
|||
AuraList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for(AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
{
|
||||
if( ((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) &&
|
||||
if (((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) &&
|
||||
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
|
||||
// -1 == any item class (not wand then)
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0 )
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0)
|
||||
// 0 == any inventory type (not wand then)
|
||||
{
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7170,13 +7168,13 @@ int32 Unit::SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask)
|
|||
|
||||
bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask)
|
||||
{
|
||||
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
||||
// If m_immuneToSchool type contain this school type, IMMUNE damage.
|
||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||
for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
||||
if (itr->type & shoolMask)
|
||||
return true;
|
||||
|
||||
//If m_immuneToDamage type contain magic, IMMUNE damage.
|
||||
// If m_immuneToDamage type contain magic, IMMUNE damage.
|
||||
SpellImmuneList const& damageList = m_spellImmune[IMMUNITY_DAMAGE];
|
||||
for (SpellImmuneList::const_iterator itr = damageList.begin(); itr != damageList.end(); ++itr)
|
||||
if (itr->type & shoolMask)
|
||||
|
|
@ -7233,7 +7231,7 @@ bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex i
|
|||
if (itr->type == effect)
|
||||
return true;
|
||||
|
||||
if(uint32 mechanic = spellInfo->EffectMechanic[index])
|
||||
if (uint32 mechanic = spellInfo->EffectMechanic[index])
|
||||
{
|
||||
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
|
||||
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
|
||||
|
|
@ -7246,7 +7244,7 @@ bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex i
|
|||
return true;
|
||||
}
|
||||
|
||||
if(uint32 aura = spellInfo->EffectApplyAuraName[index])
|
||||
if (uint32 aura = spellInfo->EffectApplyAuraName[index])
|
||||
{
|
||||
SpellImmuneList const& list = m_spellImmune[IMMUNITY_STATE];
|
||||
for(SpellImmuneList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
|
||||
|
|
@ -8749,6 +8747,7 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
|
|||
case 0: // not used
|
||||
case 1: basePoints += 1; break; // range 1..1
|
||||
default:
|
||||
{
|
||||
// range can have positive (1..rand) and negative (rand..1) values, so order its for irand
|
||||
int32 randvalue = (randomPoints >= 1)
|
||||
? irand(1, randomPoints)
|
||||
|
|
@ -8757,6 +8756,7 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
|
|||
basePoints += randvalue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int32 value = basePoints;
|
||||
|
||||
|
|
@ -10216,6 +10216,7 @@ void Unit::ClearAllReactives()
|
|||
ModifyAuraState(AURA_STATE_DEFENSE, false);
|
||||
if (getClass() == CLASS_HUNTER && HasAuraState( AURA_STATE_HUNTER_PARRY))
|
||||
ModifyAuraState(AURA_STATE_HUNTER_PARRY, false);
|
||||
|
||||
if(getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)this)->ClearComboPoints();
|
||||
}
|
||||
|
|
@ -10304,6 +10305,7 @@ Unit* Unit::SelectRandomFriendlyTarget(Unit* except /*= NULL*/, float radius /*=
|
|||
MaNGOS::UnitListSearcher<MaNGOS::AnyFriendlyUnitInObjectRangeCheck> searcher(targets, u_check);
|
||||
|
||||
Cell::VisitAllObjects(this, searcher, radius);
|
||||
|
||||
// remove current target
|
||||
if(except)
|
||||
targets.remove(except);
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ struct CalcDamageInfo
|
|||
uint32 blocked_amount;
|
||||
uint32 HitInfo;
|
||||
uint32 TargetState;
|
||||
// Helper
|
||||
// Helper
|
||||
WeaponAttackType attackType; //
|
||||
uint32 procAttacker;
|
||||
uint32 procVictim;
|
||||
|
|
@ -1089,7 +1089,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
typedef std::map<uint8, uint32> VisibleAuraMap;
|
||||
typedef std::map<SpellEntry const*, ObjectGuid> SingleCastSpellTargetMap;
|
||||
|
||||
|
||||
virtual ~Unit ( );
|
||||
|
||||
void AddToWorld();
|
||||
|
|
|
|||
|
|
@ -2851,6 +2851,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit *pVictim, uint32 d
|
|||
CastSpell(pVictim, 27526, true, castItem, triggeredByAura);
|
||||
return SPELL_AURA_PROC_OK;
|
||||
case 31255: // Deadly Swiftness (Rank 1)
|
||||
{
|
||||
// whenever you deal damage to a target who is below 20% health.
|
||||
if (pVictim->GetHealth() > pVictim->GetMaxHealth() / 5)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -2858,6 +2859,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit *pVictim, uint32 d
|
|||
target = this;
|
||||
trigger_spell_id = 22588;
|
||||
break;
|
||||
}
|
||||
//case 33207: break; // Gossip NPC Periodic - Fidget
|
||||
case 33896: // Desperate Defense (Stonescythe Whelp, Stonescythe Alpha, Stonescythe Ambusher)
|
||||
trigger_spell_id = 33898;
|
||||
|
|
@ -3696,21 +3698,21 @@ SpellAuraProcResult Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint3
|
|||
{
|
||||
case 836: // Improved Blizzard (Rank 1)
|
||||
{
|
||||
if (!procSpell || procSpell->SpellVisual[0]!=9487)
|
||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
triggered_spell_id = 12484;
|
||||
break;
|
||||
}
|
||||
case 988: // Improved Blizzard (Rank 2)
|
||||
{
|
||||
if (!procSpell || procSpell->SpellVisual[0]!=9487)
|
||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
triggered_spell_id = 12485;
|
||||
break;
|
||||
}
|
||||
case 989: // Improved Blizzard (Rank 3)
|
||||
{
|
||||
if (!procSpell || procSpell->SpellVisual[0]!=9487)
|
||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
triggered_spell_id = 12486;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -628,7 +628,6 @@ class World
|
|||
uint32 m_maxActiveSessionCount;
|
||||
uint32 m_maxQueuedSessionCount;
|
||||
|
||||
|
||||
uint32 m_configUint32Values[CONFIG_UINT32_VALUE_COUNT];
|
||||
int32 m_configInt32Values[CONFIG_INT32_VALUE_COUNT];
|
||||
float m_configFloatValues[CONFIG_FLOAT_VALUE_COUNT];
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ bool WorldSession::Update(PacketFilter& updater)
|
|||
packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG))
|
||||
{
|
||||
sLog.outDebug("Dumping error causing packet:");
|
||||
DEBUG_LOG("Dumping error causing packet:");
|
||||
packet->hexlike();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -823,7 +823,6 @@ class MANGOS_DLL_SPEC WorldSession
|
|||
void HandleGuildBankDepositMoney(WorldPacket& recv_data);
|
||||
void HandleGuildBankWithdrawMoney(WorldPacket& recv_data);
|
||||
void HandleGuildBankSwapItems(WorldPacket& recv_data);
|
||||
|
||||
void HandleGuildBankUpdateTab(WorldPacket& recv_data);
|
||||
void HandleGuildBankBuyTab(WorldPacket& recv_data);
|
||||
void HandleQueryGuildBankTabText(WorldPacket& recv_data);
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
|||
opcode, GetRemoteAddress().c_str(), m_Session?m_Session->GetAccountId():-1);
|
||||
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG))
|
||||
{
|
||||
sLog.outDebug("Dumping error-causing packet:");
|
||||
DEBUG_LOG("Dumping error-causing packet:");
|
||||
new_pct->hexlike();
|
||||
}
|
||||
|
||||
|
|
@ -983,7 +983,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
|
|||
if (m_Session && m_Session->GetSecurity () == SEC_PLAYER)
|
||||
{
|
||||
sLog.outError ("WorldSocket::HandlePing: Player kicked for "
|
||||
"over-speed pings address = %s",
|
||||
"overspeeded pings address = %s",
|
||||
GetRemoteAddress ().c_str ());
|
||||
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11972"
|
||||
#define REVISION_NR "11973"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue