diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/Group.cpp | 7 | ||||
| -rw-r--r-- | src/game/Level1.cpp | 12 | ||||
| -rw-r--r-- | src/game/Spell.cpp | 5 | ||||
| -rw-r--r-- | src/game/SpellEffects.cpp | 5 |
4 files changed, 28 insertions, 1 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 24e5601abe8..c08d1236c32 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -1511,7 +1511,12 @@ void Group::ResetInstances(uint8 method, Player* SendMsgTo) // if the map is loaded, reset it Map *map = MapManager::Instance().FindMap(p->GetMapId(), p->GetInstanceId()); if(map && map->IsDungeon()) - isEmpty = ((InstanceMap*)map)->Reset(method); + { + if(p->CanReset()) + isEmpty = ((InstanceMap*)map)->Reset(method); + else + isEmpty = !map->HavePlayers(); + } if(SendMsgTo) { diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 43e7fb74660..51e94452399 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -55,6 +55,15 @@ bool ChatHandler::HandleNpcSayCommand(const char* args) pCreature->MonsterSay(args, LANG_UNIVERSAL, 0); + // make some emotes + char lastchar = args[strlen(args) - 1]; + switch(lastchar) + { + case '?': pCreature->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION); break; + case '!': pCreature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); break; + default: pCreature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); break; + } + return true; } @@ -73,6 +82,9 @@ bool ChatHandler::HandleNpcYellCommand(const char* args) pCreature->MonsterYell(args, LANG_UNIVERSAL, 0); + // make an emote + pCreature->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT); + return true; } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 89eb18f2486..ed818d95570 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3251,6 +3251,11 @@ void Spell::SendSpellGo() //sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id); uint32 castFlags = CAST_FLAG_UNKNOWN3; + + // triggered spells with spell visual != 0 + if(m_IsTriggeredSpell || m_triggeredByAuraSpell) + castFlags |= CAST_FLAG_UNKNOWN0; + if(m_spellInfo->Attributes & SPELL_ATTR_REQ_AMMO) castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual if ((m_caster->GetTypeId() == TYPEID_PLAYER || diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2aa9413ede9..01e7ec07c05 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4157,6 +4157,11 @@ void Spell::EffectTaunt(uint32 /*i*/) unitTarget->getThreatManager().addThreat(m_caster, itsThreat - myThreat); } + //Set aggro victim to caster + if( !unitTarget->getThreatManager().getOnlineContainer().empty() ) + if(HostilReference* forcedVictim = unitTarget->getThreatManager().getOnlineContainer().getReferenceByTarget(m_caster)) + unitTarget->getThreatManager().setCurrentVictim(forcedVictim); + if(((Creature*)unitTarget)->IsAIEnabled && !((Creature*)unitTarget)->HasReactState(REACT_PASSIVE)) ((Creature*)unitTarget)->AI()->AttackStart(m_caster); } |
