Jump to content

debilvul

Members
  • Posts

    21
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by debilvul

  1. Is there a way how to learn Dual Talents by command? For example .cast or .learn since the DB is unsupported
  2. well i figured that out myself:D but i've stopped working on this
  3. couldn't be at least implemented this part? Yes it doesn't solve this issue completely but i think it's still better with this patch
  4. of course, before this patch when you were MCd only faction was changed, so you could polymorph them, my patch only makes the MCd ones attack another
  5. converted to the Player.cpp and added some fixes From 1e9f700be3e7bcd0e6e1e6304f1ddb3f67a81ea4 Mon Sep 17 00:00:00 2001 From: unknown <> Date: Sat, 7 Nov 2009 11:17:30 +0100 Subject: [PATCH] added support for charming players --- src/game/Player.cpp | 30 ++++++++++++++++++++++++++++++ src/game/Player.h | 2 ++ src/game/SpellAuras.cpp | 8 ++++++++ 3 files changed, 40 insertions(+), 0 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index bdf6b53..cc79241 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -4065,6 +4065,36 @@ void Player::SetMovement(PlayerMovementType pType) GetSession()->SendPacket( &data ); } +void Player::SetCharmed(bool apply, uint64 casterGUID, uint32 spellID) +{ + SetClientControl(this, !apply); + + if (apply) + if (Unit* pCaster = ObjectAccessor::GetObjectInWorld(casterGUID, (Unit*)NULL)) + { + std::list<HostilReference*>& threatlist = pCaster->getThreatManager().getThreatList(); + if (threatlist.size()) + for (uint8 i = 0;i < 3;++i) + { + std::list<HostilReference*>::iterator itr = threatlist.begin(); + advance(itr,(rand() % (threatlist.size()))); + if (Unit* pTarget = Unit::GetUnit((*pCaster), (*itr)->getUnitGuid())) + if (pTarget != this || !pTarget->isAlive()) + { + GetMotionMaster()->MoveChase(pTarget); + Attack(pTarget,true); //attack to make a victim for further attacks + break; + } + } + } + + if (!apply) + { + GetMotionMaster()->Clear(); + AttackStop(); + } +} + /* Preconditions: - a resurrectable corpse must not be loaded for the player (only bones) - the player must be in world diff --git a/src/game/Player.h b/src/game/Player.h index a6b1ea7..4afa91b 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1811,6 +1811,8 @@ class MANGOS_DLL_SPEC Player : public Unit void SetMovement(PlayerMovementType pType); + void SetCharmed(bool apply, uint64 casterGUID, uint32 spellID) + void JoinedChannel(Channel *c); void LeftChannel(Channel *c); void CleanupChannels(); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 8af7235..ba0b645 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3490,6 +3490,11 @@ void Aura::HandleModCharm(bool apply, bool Real) if( apply ) { + //cannot charm only one player enemy + if(m_target->GetTypeId() == TYPEID_PLAYER) + if(caster->getThreatManager().getThreatList().size() < 2) + return; + m_target->SetCharmerGUID(GetCasterGUID()); m_target->setFaction(caster->getFaction()); m_target->CastStop(m_target == caster ? GetId() : 0); @@ -3578,6 +3583,9 @@ void Aura::HandleModCharm(bool apply, bool Real) ((Creature*)m_target)->AI()->AttackedBy(caster); } } + + if(m_target->GetTypeId() == TYPEID_PLAYER) + ((Player*)m_target)->SetCharmed(apply, GetCasterGUID(), GetId()); } void Aura::HandleModConfuse(bool apply, bool Real) -- 1.6.3.msysgit.0
  6. okay, then for(uint8 i = 0; i < threatlist.size();++i) could work:) anyway, feel free to modify and reply and ofc i forgot this condition: replace if (pTarget != this) with if (pTarget != this || !pTarget->isAlive())
  7. What bug does the patch fix? What features does the patch add? Implements that players affected with aura type charm start attacking other players. (Mind controls casted by NPCs on players) For which repository revision was the patch created? 8756 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. i made a bug report but noone replied Who has been writing this patch? Please include either forum user names or email addresses. myself, debilvul From 213c15bc172895a4f229ec6296810a24db21ee28 Mon Sep 17 00:00:00 2001 From: unknown <Tygr@.(none)> Date: Mon, 2 Nov 2009 13:46:50 +0100 Subject: [PATCH] [8756]Added new function SetPlayerCharmed to make work charm effects on players --- src/game/SpellAuras.cpp | 3 +++ src/game/Unit.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/game/Unit.h | 1 + 3 files changed, 48 insertions(+), 0 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 8af7235..b16435f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3578,6 +3578,9 @@ void Aura::HandleModCharm(bool apply, bool Real) ((Creature*)m_target)->AI()->AttackedBy(caster); } } + + if(m_target->GetTypeId() == TYPEID_PLAYER) + m_target->SetPlayerCharmed(apply, GetCasterGUID(), GetId()); } void Aura::HandleModConfuse(bool apply, bool Real) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ac5f15d..1d90aea 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -180,6 +180,17 @@ void Unit::Update( uint32 p_time ) if(!IsInWorld()) return; + // handling charmed effects on players + if (GetTypeId() == TYPEID_PLAYER) + if (HasAuraType(SPELL_AURA_MOD_CHARM)) + if (isAttackReady()) + //If we are within range melee the target + if (IsWithinDistInMap(getVictim(), ATTACK_DISTANCE)) + { + AttackerStateUpdate(getVictim()); + resetAttackTimer(); + } + /*if(p_time > m_AurasCheck) { m_AurasCheck = 2000; @@ -11859,6 +11870,39 @@ void Unit::SetConfused(bool apply, uint64 const& casterGUID, uint32 spellID) ((Player*)this)->SetClientControl(this, !apply); } +void Unit::SetPlayerCharmed(bool apply, uint64 casterGUID, uint32 spellID) +{ + if (GetTypeId() != TYPEID_PLAYER) + return; + + ((Player*)this)->SetClientControl(this, !apply); + + if (apply) + if (Unit* pCaster = ObjectAccessor::GetObjectInWorld(casterGUID, (Unit*)NULL)) + { + std::list<HostilReference*>& threatlist = pCaster->getThreatManager().getThreatList(); + if (threatlist.size()) + for (; + { + std::list<HostilReference*>::iterator itr = threatlist.begin(); + advance(itr,(rand() % (threatlist.size()))); + if (Unit* pTarget = Unit::GetUnit((*pCaster), (*itr)->getUnitGuid())) + if (pTarget != this) + { + GetMotionMaster()->MoveChase(pTarget); + Attack(pTarget,true); //attack to make a victim for further attacks + break; + } + } + } + + if (!apply) + { + GetMotionMaster()->Clear(); + AttackStop(); + } +} + void Unit::SetFeignDeath(bool apply, uint64 const& casterGUID, uint32 spellID) { if( apply ) diff --git a/src/game/Unit.h b/src/game/Unit.h index b481c37..47ef114 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1510,6 +1510,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject void SetFeared(bool apply, uint64 const& casterGUID = 0, uint32 spellID = 0, uint32 time = 0); void SetConfused(bool apply, uint64 const& casterGUID = 0, uint32 spellID = 0); + void SetPlayerCharmed(bool apply, uint64 const& caterGUID = 0,uint32 spellID = 0); void SetFeignDeath(bool apply, uint64 const& casterGUID = 0, uint32 spellID = 0); void AddComboPointHolder(uint32 lowguid) { m_ComboPointHolders.insert(lowguid); } -- 1.6.3.msysgit.0
  8. i can't run on version 3.2.2 at the moment so i need to pull some 3.1.3 version is this possible in git? How to do that?
  9. Charming effects aren't working on players, it only modifies their faction So i suggest that we add a new function in Unit something like this: void Unit::SetPlayerCharmed(bool apply, uint64 casterGUID, uint32 spellID) { ((Player*)this)->SetClientControl(this, !apply); if(apply) if(Unit* caster = ObjectAccessor::GetObjectInWorld(casterGUID, (Unit*)NULL)) GetMotionMaster()->MoveChase(caster->getVictim()); } and in Aura::HandleModCharm if(m_target->GetTypeId() == TYPEID_PLAYER) m_target->SetPlayerCharmed(apply, GetCasterGUID(), GetId()); the thing is that i'd add for the charmed player for melee attack his target if ready but i don't know there to put this code if(isAttackReady()) { //If we are within range melee the target if (IsWithinDistInMap(getVictim(), ATTACK_DISTANCE)) { AttackerStateUpdate(getVictim()); resetAttackTimer(); } } anyone can help?
  10. but in scriptdev2 they tell you that it could be only hacked, because activate object isn't handled by the core yet
  11. Any progress of this? was this ever working or?
  12. And how to decode the data? just add an event in client and try to find out which field is it assigned to? or are there any else tactics?
  13. omg, 3 minutes, check http://thottbot.com/s46584
  14. Here's the thing, There are three Blood Siphon spells in Hakkar: http://www.thottbot.com/s24324 http://www.thottbot.com/s24322 http://www.thottbot.com/s24323 They are connected How should it work: Spell 24324 should apply stun for all players affected and in spell_scripts decide which player has a debuff http://www.thottbot.com/s24321. Affected Players should cast 24323, not affected 24322 How does it work: spell 24324 doesn't do a thing spells 24323 and 24322 work only when cast from players on Hakkar 24322 had entry in spell_scripts_target, for 24323 i had to add it i would add the entry for 24324 in Spell_scripts but i don't know how to make the check if target is affected byt spell 24321 or has its aura
  15. i would like to make the guild events working, but don't know where to start, any idea anybody?
  16. Would it be hard only to implement round robin for loot below Tresshold in Master looter loot? It would be really great and very useful for raids:)
  17. Is there a way to make the bots stay even in combat and perhaps do only ranged damage?
  18. get this crash always one minute after start Revision: * * 8099 * Date 1:7:2009. Time 9:38 //===================================================== *** Hardware *** Processor: AMD Athlon(tm) XP 1800+ Number Of Processors: 1 Physical Memory: 785904 KB (Available: 65276 KB) Commit Charge Limit: 1923296 KB *** Operation System *** Microsoft Windows XP Professional Service Pack 2 (Version 5.1, Build 2600) //===================================================== Exception code: C0000005 ACCESS_VIOLATION Fault address: 00495D81 01:00094D81 c:\\server\\313serv\\mangosd.exe Registers: EAX:00000000 EBX:10F4BFD8 ECX:00AAAF50 EDX:00000000 ESI:00000000 EDI:008F62A0 CS:EIP:001B:00495D81 SS:ESP:0023:0520C490 EBP:0520C4AC DS:0023 ES:0023 FS:003B GS:0000 Flags:00010202 Call stack: Address Frame Function SourceFile 00495D81 00000000 [email="?SetPvP@Unit@@QAEX_N@Z+10151"]?SetPvP@Unit@@QAEX_N@Z+10151[/email] 00495488 00000000 [email="?SetPvP@Unit@@QAEX_N@Z+F858"]?SetPvP@Unit@@QAEX_N@Z+F858[/email] 00622072 00000000 [email="?SendAddonsInfo@WorldSession@@QAEXXZ+8AC2"]?SendAddonsInfo@WorldSession@@QAEXXZ+8AC2[/email] 0085E7E8 00000000 [email="?SpawnedEventConditionsCheck@CreatureEventAI@@QAE_NABUCreatureEventAI_Event@@@Z+82A8"]?SpawnedEventConditionsCheck@CreatureEventAI@@QAE_NABUCreatureEventAI_Event@@@Z+82A8[/email] 0063DEB9 00000000 [email="??0CreatureEventAI@@QAE@ABV0@@Z+6449"]??0CreatureEventAI@@QAE@ABV0@@Z+6449[/email] 0043823E 00000000 [email="?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1EF6E"]?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1EF6E[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 7C802532 00000000 WaitForSingleObject+12 Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 7C802451 00000000 Sleep+F 008F64D0 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+F50"]?GetFloatDefault@Config@@QAEMPBDM@Z+F50[/email] 008FD021 00000000 [email="?step@barGoLink@@QAEXXZ+2121"]?step@barGoLink@@QAEXXZ+2121[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 7C802451 00000000 Sleep+F 008F64D0 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+F50"]?GetFloatDefault@Config@@QAEMPBDM@Z+F50[/email] 008FD021 00000000 [email="?step@barGoLink@@QAEXXZ+2121"]?step@barGoLink@@QAEXXZ+2121[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 7C802451 00000000 Sleep+F 008F64D0 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+F50"]?GetFloatDefault@Config@@QAEMPBDM@Z+F50[/email] 008FD021 00000000 [email="?step@barGoLink@@QAEXXZ+2121"]?step@barGoLink@@QAEXXZ+2121[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 0520B09C 00000000 0000:00000000 FF50D845 FFFFFFFF 0000:00000000 Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 7C871B41 00000000 GetConsoleInputWaitHandle+318 7C871C88 00000000 ReadConsoleA+3B 7C8018B3 00000000 ReadFile+A5 78586A93 00000000 realloc+9F7 78586F17 00000000 _read+C0 7854EC7A 00000000 _filbuf+7D 7854E319 00000000 fgets+109 00410AEC 00000000 [email="??4Config@@QAEAAV0@ABV0@@Z+D0C"]??4Config@@QAEAAV0@ABV0@@Z+D0C[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 7C802451 00000000 Sleep+F 008F64D0 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+F50"]?GetFloatDefault@Config@@QAEMPBDM@Z+F50[/email] 00434188 00000000 [email="?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1AEB8"]?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1AEB8[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 71A35FA7 00000000 0001:00004FA7 C:\\WINDOWS\\system32\\MSWSOCK.dll 71A92E67 00000000 select+A7 00AD4AA5 00000000 [email="?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115"]?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115[/email] FFFFFFFF FFFFFFFF 0000:00000000 Call stack: Address Frame Function SourceFile 7C90E514 00000000 KiFastSystemCallRet+0 71A35FA7 00000000 0001:00004FA7 C:\\WINDOWS\\system32\\MSWSOCK.dll 71A92E67 00000000 select+A7 00AD4AA5 00000000 [email="?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115"]?wait_for_multiple_events@?$ACE_Select_Reactor_T@V?$ACE_Reactor_Token_T@VACE_Token@@@@@@MAEHAAVACE_Select_Reactor_Handle_Set@@PAVACE_Time_Value@@@Z+115[/email] FFFFFFFF FFFFFFFF 0000:00000000 ======================== Local Variables And Parameters Call stack: Address Frame Function SourceFile 00495D81 00000000 [email="?SetPvP@Unit@@QAEX_N@Z+10151"]?SetPvP@Unit@@QAEX_N@Z+10151[/email] 00495488 00000000 [email="?SetPvP@Unit@@QAEX_N@Z+F858"]?SetPvP@Unit@@QAEX_N@Z+F858[/email] 00622072 00000000 [email="?SendAddonsInfo@WorldSession@@QAEXXZ+8AC2"]?SendAddonsInfo@WorldSession@@QAEXXZ+8AC2[/email] 0085E7E8 00000000 [email="?SpawnedEventConditionsCheck@CreatureEventAI@@QAE_NABUCreatureEventAI_Event@@@Z+82A8"]?SpawnedEventConditionsCheck@CreatureEventAI@@QAE_NABUCreatureEventAI_Event@@@Z+82A8[/email] 0063DEB9 00000000 [email="??0CreatureEventAI@@QAE@ABV0@@Z+6449"]??0CreatureEventAI@@QAE@ABV0@@Z+6449[/email] 0043823E 00000000 [email="?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1EF6E"]?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+1EF6E[/email] 008F62B7 00000000 [email="?GetFloatDefault@Config@@QAEMPBDM@Z+D37"]?GetFloatDefault@Config@@QAEMPBDM@Z+D37[/email] 00B11474 00000000 [email="?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74"]?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74[/email] 78543433 00000000 _endthreadex+44 785434C7 00000000 _endthreadex+D8 7C80B699 00000000 GetModuleFileNameA+1BA
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use