*Update to Mangos 6963.
--HG-- branch : trunk
This commit is contained in:
+5
-5
@@ -110,6 +110,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ "hp", SEC_MODERATOR, false, &ChatHandler::HandleModifyHPCommand, "", NULL },
|
||||
{ "mana", SEC_MODERATOR, false, &ChatHandler::HandleModifyManaCommand, "", NULL },
|
||||
{ "rage", SEC_MODERATOR, false, &ChatHandler::HandleModifyRageCommand, "", NULL },
|
||||
{ "runicpower", SEC_MODERATOR, false, &ChatHandler::HandleModifyRunicPowerCommand, "", NULL },
|
||||
{ "energy", SEC_MODERATOR, false, &ChatHandler::HandleModifyEnergyCommand, "", NULL },
|
||||
{ "money", SEC_MODERATOR, false, &ChatHandler::HandleModifyMoneyCommand, "", NULL },
|
||||
{ "speed", SEC_MODERATOR, false, &ChatHandler::HandleModifySpeedCommand, "", NULL },
|
||||
@@ -301,7 +302,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ "locales_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesQuestCommand, "", NULL },
|
||||
{ "waypoint_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadWpScriptsCommand, "", NULL },
|
||||
|
||||
{ "", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
@@ -753,9 +753,9 @@ void ChatHandler::PSendSysMessage(int32 entry, ...)
|
||||
{
|
||||
const char *format = GetTrinityString(entry);
|
||||
va_list ap;
|
||||
char str [1024];
|
||||
char str [2048];
|
||||
va_start(ap, entry);
|
||||
vsnprintf(str,1024,format, ap );
|
||||
vsnprintf(str,2048,format, ap );
|
||||
va_end(ap);
|
||||
SendSysMessage(str);
|
||||
}
|
||||
@@ -763,9 +763,9 @@ void ChatHandler::PSendSysMessage(int32 entry, ...)
|
||||
void ChatHandler::PSendSysMessage(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char str [1024];
|
||||
char str [2048];
|
||||
va_start(ap, format);
|
||||
vsnprintf(str,1024,format, ap );
|
||||
vsnprintf(str,2048,format, ap );
|
||||
va_end(ap);
|
||||
SendSysMessage(str);
|
||||
}
|
||||
|
||||
+1
-1
@@ -163,6 +163,7 @@ class ChatHandler
|
||||
bool HandleModifyHPCommand(const char* args);
|
||||
bool HandleModifyManaCommand(const char* args);
|
||||
bool HandleModifyRageCommand(const char* args);
|
||||
bool HandleModifyRunicPowerCommand(const char* args);
|
||||
bool HandleModifyEnergyCommand(const char* args);
|
||||
bool HandleModifyMoneyCommand(const char* args);
|
||||
bool HandleModifyASpeedCommand(const char* args);
|
||||
@@ -202,7 +203,6 @@ class ChatHandler
|
||||
bool HandleNpcWhisperCommand(const char* args);
|
||||
bool HandleNpcYellCommand(const char* args);
|
||||
|
||||
bool HandleReloadCommand(const char* args);
|
||||
bool HandleReloadAllCommand(const char* args);
|
||||
bool HandleReloadAllAreaCommand(const char* args);
|
||||
bool HandleReloadAllItemCommand(const char* args);
|
||||
|
||||
+8
-7
@@ -1213,18 +1213,19 @@ void Guild::LoadGuildBankFromDB()
|
||||
|
||||
delete result;
|
||||
|
||||
// 0 1 2 3
|
||||
result = CharacterDatabase.PQuery("SELECT TabId, SlotId, item_guid, item_entry FROM guild_bank_item WHERE guildid='%u' ORDER BY TabId", Id);
|
||||
// data needs to be at first place for Item::LoadFromDB
|
||||
// 0 1 2 3 4
|
||||
result = CharacterDatabase.PQuery("SELECT data, TabId, SlotId, item_guid, item_entry FROM guild_bank_item JOIN item_instance ON item_guid = guid WHERE guildid='%u' ORDER BY TabId", Id);
|
||||
if(!result)
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
uint8 TabId = fields[0].GetUInt8();
|
||||
uint8 SlotId = fields[1].GetUInt8();
|
||||
uint32 ItemGuid = fields[2].GetUInt32();
|
||||
uint32 ItemEntry = fields[3].GetUInt32();
|
||||
uint8 TabId = fields[1].GetUInt8();
|
||||
uint8 SlotId = fields[2].GetUInt8();
|
||||
uint32 ItemGuid = fields[3].GetUInt32();
|
||||
uint32 ItemEntry = fields[4].GetUInt32();
|
||||
|
||||
if (TabId >= purchased_tabs || TabId >= GUILD_BANK_MAX_TABS)
|
||||
{
|
||||
@@ -1247,7 +1248,7 @@ void Guild::LoadGuildBankFromDB()
|
||||
}
|
||||
|
||||
Item *pItem = NewItemOrBag(proto);
|
||||
if(!pItem->LoadFromDB(ItemGuid, 0))
|
||||
if(!pItem->LoadFromDB(ItemGuid, 0, result))
|
||||
{
|
||||
CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE guildid='%u' AND TabId='%u' AND SlotId='%u'", Id, uint32(TabId), uint32(SlotId));
|
||||
sLog.outError("Item GUID %u not found in item_instance, deleting from Guild Bank!", ItemGuid);
|
||||
|
||||
+3
-1
@@ -170,7 +170,9 @@ enum TrinityStrings
|
||||
LANG_SOUND_NOT_EXIST = 170,
|
||||
LANG_TELEPORTED_TO_BY_CONSOLE = 171,
|
||||
LANG_CONSOLE_COMMAND = 172,
|
||||
// Room for more level 1 173-199 not used
|
||||
LANG_YOU_CHANGE_RUNIC_POWER = 173,
|
||||
LANG_YOURS_RUNIC_POWER_CHANGED = 174,
|
||||
// Room for more level 1 175-199 not used
|
||||
|
||||
// level 2 chat
|
||||
LANG_NO_SELECTION = 200,
|
||||
|
||||
@@ -874,6 +874,40 @@ bool ChatHandler::HandleModifyRageCommand(const char* args)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Edit Player Runic Power
|
||||
bool ChatHandler::HandleModifyRunicPowerCommand(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
int32 rune = atoi((char*)args)*10;
|
||||
int32 runem = atoi((char*)args)*10;
|
||||
|
||||
if (rune <= 0 || runem <= 0 || runem < rune)
|
||||
{
|
||||
SendSysMessage(LANG_BAD_VALUE);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Player *chr = getSelectedPlayer();
|
||||
if (chr == NULL)
|
||||
{
|
||||
SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, chr->GetName(), rune/10, runem/10);
|
||||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, GetName(), rune/10, runem/10);
|
||||
|
||||
chr->SetMaxPower(POWER_RUNIC_POWER,runem );
|
||||
chr->SetPower(POWER_RUNIC_POWER, rune );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//Edit Player Faction
|
||||
bool ChatHandler::HandleModifyFactionCommand(const char* args)
|
||||
{
|
||||
|
||||
@@ -54,14 +54,6 @@
|
||||
#include "InstanceData.h"
|
||||
|
||||
//reload commands
|
||||
bool ChatHandler::HandleReloadCommand(const char* arg)
|
||||
{
|
||||
// this is error catcher for wrong table name in .reload commands
|
||||
PSendSysMessage("Db table with name starting from '%s' not found and can't be reloaded.",arg);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadAllCommand(const char*)
|
||||
{
|
||||
HandleReloadAreaTriggerTeleportCommand("");
|
||||
|
||||
@@ -1987,7 +1987,8 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
|
||||
void ObjectMgr::LoadAuctionItems()
|
||||
{
|
||||
QueryResult *result = CharacterDatabase.Query( "SELECT itemguid,item_template FROM auctionhouse" );
|
||||
// data needs to be at first place for Item::LoadFromDB
|
||||
QueryResult *result = CharacterDatabase.Query( "SELECT data,itemguid,item_template FROM auctionhouse JOIN item_instance ON itemguid = guid" );
|
||||
|
||||
if( !result )
|
||||
return;
|
||||
@@ -2002,8 +2003,8 @@ void ObjectMgr::LoadAuctionItems()
|
||||
bar.step();
|
||||
|
||||
fields = result->Fetch();
|
||||
uint32 item_guid = fields[0].GetUInt32();
|
||||
uint32 item_template = fields[1].GetUInt32();
|
||||
uint32 item_guid = fields[1].GetUInt32();
|
||||
uint32 item_template = fields[2].GetUInt32();
|
||||
|
||||
ItemPrototype const *proto = GetItemPrototype(item_template);
|
||||
|
||||
@@ -2015,7 +2016,7 @@ void ObjectMgr::LoadAuctionItems()
|
||||
|
||||
Item *item = NewItemOrBag(proto);
|
||||
|
||||
if(!item->LoadFromDB(item_guid,0))
|
||||
if(!item->LoadFromDB(item_guid,0, result))
|
||||
{
|
||||
delete item;
|
||||
continue;
|
||||
|
||||
+12
-10
@@ -3666,15 +3666,16 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
MailItemsInfo mi;
|
||||
if(has_items)
|
||||
{
|
||||
QueryResult *resultItems = CharacterDatabase.PQuery("SELECT item_guid,item_template FROM mail_items WHERE mail_id='%u'", mail_id);
|
||||
// data needs to be at first place for Item::LoadFromDB
|
||||
QueryResult *resultItems = CharacterDatabase.PQuery("SELECT data,item_guid,item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE mail_id='%u'", mail_id);
|
||||
if(resultItems)
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *fields2 = resultItems->Fetch();
|
||||
|
||||
uint32 item_guidlow = fields2[0].GetUInt32();
|
||||
uint32 item_template = fields2[1].GetUInt32();
|
||||
uint32 item_guidlow = fields2[1].GetUInt32();
|
||||
uint32 item_template = fields2[2].GetUInt32();
|
||||
|
||||
ItemPrototype const* itemProto = objmgr.GetItemPrototype(item_template);
|
||||
if(!itemProto)
|
||||
@@ -3684,7 +3685,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
}
|
||||
|
||||
Item *pItem = NewItemOrBag(itemProto);
|
||||
if(!pItem->LoadFromDB(item_guidlow, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER)))
|
||||
if(!pItem->LoadFromDB(item_guidlow, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER),resultItems))
|
||||
{
|
||||
pItem->FSetState(ITEM_REMOVED);
|
||||
pItem->SaveToDB(); // it also deletes item object !
|
||||
@@ -6416,13 +6417,13 @@ void Player::UpdateZone(uint32 newZone)
|
||||
|
||||
if(zone->flags & AREA_FLAG_SANCTUARY) // in sanctuary
|
||||
{
|
||||
SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY);
|
||||
SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
|
||||
if(sWorld.IsFFAPvPRealm())
|
||||
RemoveFlag(PLAYER_FLAGS,PLAYER_FLAGS_FFA_PVP);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_SANCTUARY);
|
||||
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
|
||||
}
|
||||
|
||||
if(zone->flags & AREA_FLAG_CAPITAL) // in capital city
|
||||
@@ -14979,15 +14980,16 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
|
||||
// load mailed item which should receive current player
|
||||
void Player::_LoadMailedItems(Mail *mail)
|
||||
{
|
||||
QueryResult* result = CharacterDatabase.PQuery("SELECT item_guid, item_template FROM mail_items WHERE mail_id='%u'", mail->messageID);
|
||||
// data needs to be at first place for Item::LoadFromDB
|
||||
QueryResult* result = CharacterDatabase.PQuery("SELECT data, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE mail_id='%u'", mail->messageID);
|
||||
if(!result)
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
uint32 item_guid_low = fields[0].GetUInt32();
|
||||
uint32 item_template = fields[1].GetUInt32();
|
||||
uint32 item_guid_low = fields[1].GetUInt32();
|
||||
uint32 item_template = fields[2].GetUInt32();
|
||||
|
||||
mail->AddItem(item_guid_low, item_template);
|
||||
|
||||
@@ -15003,7 +15005,7 @@ void Player::_LoadMailedItems(Mail *mail)
|
||||
|
||||
Item *item = NewItemOrBag(proto);
|
||||
|
||||
if(!item->LoadFromDB(item_guid_low, 0))
|
||||
if(!item->LoadFromDB(item_guid_low, 0, result))
|
||||
{
|
||||
sLog.outError( "Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, item_guid_low);
|
||||
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid = '%u'", item_guid_low);
|
||||
|
||||
+2
-2
@@ -428,8 +428,8 @@ enum PlayerFlags
|
||||
PLAYER_FLAGS_UNK1 = 0x00001000, // played long time
|
||||
PLAYER_FLAGS_UNK2 = 0x00002000, // played too long time
|
||||
PLAYER_FLAGS_UNK3 = 0x00008000, // strange visual effect (2.0.1), looks like PLAYER_FLAGS_GHOST flag
|
||||
PLAYER_FLAGS_SANCTUARY = 0x00010000, // player entered sanctuary
|
||||
PLAYER_FLAGS_UNK4 = 0x00020000, // taxi benchmark mode (on/off) (2.0.1)
|
||||
PLAYER_FLAGS_UNK4 = 0x00010000, // pre-3.0.3 PLAYER_FLAGS_SANCTUARY flag for player entered sanctuary
|
||||
PLAYER_FLAGS_UNK5 = 0x00020000, // taxi benchmark mode (on/off) (2.0.1)
|
||||
PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 3.0.2, pvp timer active (after you disable pvp manually)
|
||||
};
|
||||
|
||||
|
||||
@@ -850,83 +850,6 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
|
||||
target.effectMask = 1<<effIndex;
|
||||
m_UniqueItemInfo.push_back(target);
|
||||
}
|
||||
/*
|
||||
void Spell::doTriggers(SpellMissInfo missInfo, uint32 damage, SpellSchoolMask damageSchoolMask, uint32 block, uint32 absorb, bool crit)
|
||||
{
|
||||
// Do triggers depends from hit result (triggers on hit do in effects)
|
||||
// Set aura states depends from hit result
|
||||
if (missInfo!=SPELL_MISS_NONE)
|
||||
{
|
||||
// Miss/dodge/parry/block only for melee based spells
|
||||
// Resist only for magic based spells
|
||||
switch (missInfo)
|
||||
{
|
||||
case SPELL_MISS_MISS:
|
||||
if(m_caster->GetTypeId()== TYPEID_PLAYER)
|
||||
((Player*)m_caster)->UpdateWeaponSkill(BASE_ATTACK);
|
||||
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_MISS, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_RESIST:
|
||||
m_caster->ProcDamageAndSpell(unitTarget, PROC_FLAG_TARGET_RESISTS, PROC_FLAG_RESIST_SPELL, 0, damageSchoolMask, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_DODGE:
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->UpdateDefense();
|
||||
|
||||
// Overpower
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->getClass() == CLASS_WARRIOR)
|
||||
{
|
||||
((Player*) m_caster)->AddComboPoints(unitTarget, 1);
|
||||
m_caster->StartReactiveTimer( REACTIVE_OVERPOWER );
|
||||
}
|
||||
|
||||
// Riposte
|
||||
if (unitTarget->getClass() != CLASS_ROGUE)
|
||||
{
|
||||
unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_DEFENSE );
|
||||
}
|
||||
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_DODGE, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_PARRY:
|
||||
// Update victim defense ?
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->UpdateDefense();
|
||||
// Mongoose bite - set only Counterattack here
|
||||
if (unitTarget->getClass() == CLASS_HUNTER)
|
||||
{
|
||||
unitTarget->ModifyAuraState(AURA_STATE_HUNTER_PARRY,true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_HUNTER_PARRY );
|
||||
}
|
||||
else
|
||||
{
|
||||
unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_DEFENSE );
|
||||
}
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_PARRY, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
case SPELL_MISS_BLOCK:
|
||||
unitTarget->ModifyAuraState(AURA_STATE_DEFENSE, true);
|
||||
unitTarget->StartReactiveTimer( REACTIVE_DEFENSE );
|
||||
|
||||
m_caster->CastMeleeProcDamageAndSpell(unitTarget, 0, damageSchoolMask, m_attackType, MELEE_HIT_BLOCK, m_spellInfo, m_IsTriggeredSpell);
|
||||
break;
|
||||
// Trigger from this events not supported
|
||||
case SPELL_MISS_EVADE:
|
||||
case SPELL_MISS_IMMUNE:
|
||||
case SPELL_MISS_IMMUNE2:
|
||||
case SPELL_MISS_DEFLECT:
|
||||
case SPELL_MISS_ABSORB:
|
||||
// Trigger from reflects need do after get reflect result
|
||||
case SPELL_MISS_REFLECT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
{
|
||||
|
||||
@@ -5398,8 +5398,6 @@ void Spell::EffectApplyGlyph(uint32 i)
|
||||
|
||||
player->CastSpell(m_caster, gp->SpellId, true);
|
||||
player->SetGlyph(m_glyphIndex, glyph);
|
||||
if(m_CastItem)
|
||||
player->DestroyItemCount(m_CastItem->GetEntry(), 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-72
@@ -1073,81 +1073,11 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
|
||||
sLog.outString();
|
||||
if (customProc)
|
||||
sLog.outString( ">> Loaded %u custom spell proc event conditions +%u custom", count, customProc );
|
||||
sLog.outString( ">> Loaded %u extra spell proc event conditions +%u custom", count, customProc );
|
||||
else
|
||||
sLog.outString( ">> Loaded %u spell proc event conditions", count );
|
||||
|
||||
/*
|
||||
// Commented for now, as it still produces many errors (still quite many spells miss spell_proc_event)
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
bool found = false;
|
||||
for (int effectId = 0; effectId < 3; ++effectId)
|
||||
{
|
||||
// at this moment check only SPELL_AURA_PROC_TRIGGER_SPELL
|
||||
if( spellInfo->EffectApplyAuraName[effectId] == SPELL_AURA_PROC_TRIGGER_SPELL )
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found)
|
||||
continue;
|
||||
|
||||
if(GetSpellProcEvent(id))
|
||||
continue;
|
||||
|
||||
sLog.outErrorDb("Spell %u (%s) misses spell_proc_event",id,spellInfo->SpellName[sWorld.GetDBClang()]);
|
||||
}
|
||||
*/
|
||||
sLog.outString( ">> Loaded %u extra spell proc event conditions", count );
|
||||
}
|
||||
|
||||
/*
|
||||
bool SpellMgr::IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, SpellEntry const * procSpell, uint32 procFlags )
|
||||
{
|
||||
if((procFlags & spellProcEvent->procFlags) == 0)
|
||||
return false;
|
||||
|
||||
// Additional checks in case spell cast/hit/crit is the event
|
||||
// Check (if set) school, category, skill line, spell talent mask
|
||||
if(spellProcEvent->schoolMask && (!procSpell || (GetSpellSchoolMask(procSpell) & spellProcEvent->schoolMask) == 0))
|
||||
return false;
|
||||
if(spellProcEvent->category && (!procSpell || procSpell->Category != spellProcEvent->category))
|
||||
return false;
|
||||
if(spellProcEvent->skillId)
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
SkillLineAbilityMap::const_iterator lower = spellmgr.GetBeginSkillLineAbilityMap(procSpell->Id);
|
||||
SkillLineAbilityMap::const_iterator upper = spellmgr.GetEndSkillLineAbilityMap(procSpell->Id);
|
||||
|
||||
bool found = false;
|
||||
for(SkillLineAbilityMap::const_iterator _spell_idx = lower; _spell_idx != upper; ++_spell_idx)
|
||||
{
|
||||
if(_spell_idx->second->skillId == spellProcEvent->skillId)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
return false;
|
||||
}
|
||||
if(spellProcEvent->spellFamilyName && (!procSpell || spellProcEvent->spellFamilyName != procSpell->SpellFamilyName))
|
||||
return false;
|
||||
if(spellProcEvent->spellFamilyMask && (!procSpell || (spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags) == 0))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active)
|
||||
{
|
||||
// No extra req need
|
||||
|
||||
+6
-6
@@ -482,14 +482,14 @@ enum ProcFlags
|
||||
PROC_FLAG_KILLED = 0x00000001, // 00 Killed by agressor
|
||||
PROC_FLAG_KILL_AND_GET_XP = 0x00000002, // 01 Kill that yields experience or honor
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_MILEE_HIT = 0x00000004, // 02 Successful melee attack
|
||||
PROC_FLAG_TAKEN_MELEE_HIT = 0x00000008, // 03 Taken damage from melee strike hit
|
||||
PROC_FLAG_SUCCESSFUL_MILEE_HIT = 0x00000004, // 02 Successful melee auto attack
|
||||
PROC_FLAG_TAKEN_MELEE_HIT = 0x00000008, // 03 Taken damage from melee auto attack hit
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT = 0x00000010, // 04 Successful attack by Spell that use melee weapon
|
||||
PROC_FLAG_TAKEN_MELEE_SPELL_HIT = 0x00000020, // 05 Taken damage by Spell that use melee weapon
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_RANGED_HIT = 0x00000040, // 06 Successful Ranged attack (all ranged attack deal as spell so newer set :( )
|
||||
PROC_FLAG_TAKEN_RANGED_HIT = 0x00000080, // 07 Taken damage from ranged attack (all ranged attack deal as spell so newer set :( )
|
||||
PROC_FLAG_SUCCESSFUL_RANGED_HIT = 0x00000040, // 06 Successful Ranged auto attack
|
||||
PROC_FLAG_TAKEN_RANGED_HIT = 0x00000080, // 07 Taken damage from ranged auto attack
|
||||
|
||||
PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT = 0x00000100, // 08 Successful Ranged attack by Spell that use ranged weapon
|
||||
PROC_FLAG_TAKEN_RANGED_SPELL_HIT = 0x00000200, // 09 Taken damage by Spell that use ranged weapon
|
||||
@@ -540,12 +540,12 @@ enum ProcFlagsEx
|
||||
PROC_EX_DEFLECT = 0x0000200,
|
||||
PROC_EX_ABSORB = 0x0000400,
|
||||
PROC_EX_REFLECT = 0x0000800,
|
||||
PROC_EX_INTERRUPT = 0x0001000, // Melle hit result can be Interrupt (not used)
|
||||
PROC_EX_INTERRUPT = 0x0001000, // Melee hit result can be Interrupt (not used)
|
||||
PROC_EX_RESERVED1 = 0x0002000,
|
||||
PROC_EX_RESERVED2 = 0x0004000,
|
||||
PROC_EX_RESERVED3 = 0x0008000,
|
||||
PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges
|
||||
PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 // If set trigger always but only one time
|
||||
PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000 // If set trigger always but only one time (not used)
|
||||
};
|
||||
|
||||
struct SpellProcEventEntry
|
||||
|
||||
+523
-2150
File diff suppressed because it is too large
Load Diff
@@ -778,7 +778,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
typedef std::multimap< spellEffectPair, Aura*> AuraMap;
|
||||
typedef std::list<Aura *> AuraList;
|
||||
typedef std::list<DiminishingReturn> Diminishing;
|
||||
typedef std::set<AuraType> AuraTypeSet;
|
||||
typedef std::set<uint32> ComboPointHolderSet;
|
||||
typedef std::map<uint8, uint32> VisibleAuraMap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user