mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8016] Work at npc click table data use.
* New fields in `npc_spellclick_spells` for allow set npc spell click mode from quest to infinity or to another quest, or from reward quest. * Not expect (and forbid set UNIT_NPC_FLAG_SPELLCLICK in DB and set it at `npc_spellclick_spells` loading. * Apply some speedups for creature checks affected by spel click state
This commit is contained in:
parent
08fe4933c5
commit
5254a498df
9 changed files with 106 additions and 30 deletions
|
|
@ -523,10 +523,10 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
|
|||
if(!unit)
|
||||
return;
|
||||
|
||||
SpellClickInfoMap const& map = objmgr.mSpellClickInfoMap;
|
||||
for(SpellClickInfoMap::const_iterator itr = map.lower_bound(unit->GetEntry()); itr != map.upper_bound(unit->GetEntry()); ++itr)
|
||||
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
|
||||
for(SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
|
||||
{
|
||||
if(itr->second.questId == 0 || _player->GetQuestStatus(itr->second.questId) == QUEST_STATUS_INCOMPLETE)
|
||||
if(itr->second.IsFitToRequirements(_player))
|
||||
{
|
||||
Unit *caster = (itr->second.castFlags & 0x1) ? (Unit*)_player : (Unit*)unit;
|
||||
Unit *target = (itr->second.castFlags & 0x2) ? (Unit*)_player : (Unit*)unit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue