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
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,6 +2221,7 @@ bool ChatHandler::HandleNpcUnFollowCommand(char* /*args*/)
|
|||
bool ChatHandler::HandleNpcTameCommand(char* /*args*/)
|
||||
{
|
||||
Creature *creatureTarget = getSelectedCreature ();
|
||||
|
||||
if (!creatureTarget || creatureTarget->IsPet())
|
||||
{
|
||||
PSendSysMessage(LANG_SELECT_CREATURE);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
@ -2014,16 +2015,19 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
{
|
||||
if (!prev->IsWithinDist(*next,CHAIN_SPELL_JUMP_RADIUS))
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -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())
|
||||
{
|
||||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -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))
|
||||
|
|
@ -7946,6 +7949,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
|||
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_POTION:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
@ -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)))
|
||||
{
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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