Jump to content

walkofdoom

Members
  • Posts

    4
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

walkofdoom's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. Hi, I fixed the problem, here's the patch: diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp index ea3e00d..1270dd4 100644 --- a/src/game/PlayerbotAI.cpp +++ b/src/game/PlayerbotAI.cpp @@ -559,7 +559,16 @@ void PlayerbotAI::HandleMasterIncomingPacket(const WorldPacket& packet, WorldSes } } // just choose first reward if we cant use any of the rewards - uint32 rewardItemId = (pRewardItem == NULL) ? pQuest->RewChoiceItemId[0] : pRewardItem->ItemId; + uint32 rewardItemId; + if (pRewardItem == NULL) + { + rewardItemId = pQuest->RewChoiceItemId[0]; + pRewardItem = objmgr.GetItemPrototype(rewardItemId); + } + else + { + rewardItemId = pRewardItem->ItemId; + } if (bot->CanRewardQuest(pQuest, rewardItemId, false)) { pRewardItem could be still null, so the line 'std::string itemName = pRewardItem->Name1;' crashed. I have no github account, so feel free to upload this.
  2. You're welcome! I really love to see how fast this branch develops. Hope I can help with debugging so far. Sadly I've got not that much time to contribute more by coding some class AI, so I'll continue reporting EDIT: Reward taking is still buggy. Problem with choosing a reward, (e.g. at quest http://www.wowhead.com/?quest=10324 ) Program received signal SIGSEGV, Segmentation fault. [switching to Thread 0xb3c8fb90 (LWP 16707)] PlayerbotAI::HandleMasterIncomingPacket (packet=@0xac2c368, masterSession=@0xc26f578) at ../../../src/game/PlayerbotAI.cpp:568 568 std::string itemName = pRewardItem->Name1; CRASH ON Mo 8. Jun 20:43:34 CEST 2009 Using the running image of child Thread 0xb3c8fb90 (LWP 16707). Program stopped at 0x833a55a. It stopped with signal SIGSEGV, Segmentation fault. Type "info stack" or "info registers" for more information. BACKTRACE #0 PlayerbotAI::HandleMasterIncomingPacket (packet=@0xac2c368, masterSession=@0xc26f578) at ../../../src/game/PlayerbotAI.cpp:568 #1 0x08412045 in WorldSession::Update (this=0xc26f578) at ../../../src/game/WorldSession.cpp:203 #2 0x0840a3e8 in World::UpdateSessions (this=0x8654950, diff=99) at ../../../src/game/World.cpp:2678 #3 0x0840ab3c in World::Update (this=0x8654950, diff=99) at ../../../src/game/World.cpp:1519 #4 0x0813502a in WorldRunnable::run (this=0xebed6d0) at ../../../src/mangosd/WorldRunnable.cpp:65 #5 0x084c5441 in ACE_Based::Thread::ThreadTask (param=0xebed6d0) at ../../../src/shared/Threading.cpp:159 #6 0xb7cc5227 in ACE_OS_Thread_Adapter::invoke (this=0xaacaee8) at ../../../../dep/ACE_wrappers/ace/OS_Thread_Adapter.cpp:90 #7 0xb7c70941 in ace_thread_adapter (args=0xaacaee8) at ../../../../dep/ACE_wrappers/ace/Base_Thread_Adapter.cpp:124 #8 0xb793e4fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #9 0xb779ce5e in clone () from /lib/tls/i686/cmov/libc.so.6
  3. Great that it could be fixed that fast. Thanks I found another problem with the auto-quest-turn-in: It occures, when bots try to turn in the quest 'The Great Moongraze Hunt' (http://www.wowhead.com/?quest=9454) at the questgiver. Core: 7940 SD2: 1106 UDB: 380 ACID: 0.1.0 Extra branches: git://github.com/Gigelf/mangos.git auctionhouse, git://github.com/playerbot/mangos.git OS: Linux Program received signal SIGSEGV, Segmentation fault. [switching to Thread 0xb3c6eb90 (LWP 16761)] PlayerbotAI::HandleMasterIncomingPacket (packet=@0xaf1004f8, masterSession=@0xf3965c8) at ../../../src/game/PlayerbotAI.cpp:613 613 << " |cffffffff|Hitem:" << rewardItemId << ":0:0:0:0:0:0:0" << "|h[" << pRewardItem->Name1 << "]|h|r"; CRASH ON So 7. Jun 23:32:22 CEST 2009 Using the running image of child Thread 0xb3c6eb90 (LWP 16761). Program stopped at 0x833d063. It stopped with signal SIGSEGV, Segmentation fault. Type "info stack" or "info registers" for more information. BACKTRACE #0 PlayerbotAI::HandleMasterIncomingPacket (packet=@0xaf1004f8, masterSession=@0xf3965c8) at ../../../src/game/PlayerbotAI.cpp:613 #1 0x08412045 in WorldSession::Update (this=0xf3965c8) at ../../../src/game/WorldSession.cpp:203 #2 0x0840a3e8 in World::UpdateSessions (this=0x86549b0, diff=100) at ../../../src/game/World.cpp:2678 #3 0x0840ab3c in World::Update (this=0x86549b0, diff=100) at ../../../src/game/World.cpp:1519 #4 0x08134f9a in WorldRunnable::run (this=0xc132ca8) at ../../../src/mangosd/WorldRunnable.cpp:65 #5 0x084c5441 in ACE_Based::Thread::ThreadTask (param=0xc132ca8) at ../../../src/shared/Threading.cpp:159 #6 0xb7ca40b7 in ACE_OS_Thread_Adapter::invoke (this=0xc134dd0) at ../../../../dep/ACE_wrappers/ace/OS_Thread_Adapter.cpp:90 #7 0xb7c4f8f1 in ace_thread_adapter (args=0xc134dd0) at ../../../../dep/ACE_wrappers/ace/Base_Thread_Adapter.cpp:124 #8 0xb791d4fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #9 0xb777be5e in clone () from /lib/tls/i686/cmov/libc.so.6
  4. Hi there! First of all, very nice work of you guys. But sadly I'm experiencing crashes with the bot. I'm running my server with this config: Core: 7894 SD2: 1106 UDB: 380 ACID: 0.1.0 Extra branches: git://github.com/Gigelf/mangos.git auctionhouse, git://github.com/playerbot/mangos.git OS: Linux The crash isn't that easy to reproduce, but occures sometimes, when I'm running with 4 bots in a group through some mobs and run away, while the bots attack them. So, here's the dump: Program received signal SIGSEGV, Segmentation fault. [switching to Thread 0xb3bd3b90 (LWP 6527)] std::_Rb_tree<std::Pair<unsigned int, unsigned char>, std::Pair<std::Pair<unsigned int, unsigned char> const, Aura*>, std::_Select1st<std::Pair<std::Pair<unsigned int, unsigned char> const, Aura*> >, std::less<std::Pair<unsigned int, unsigned char> >, std::allocator<std::Pair<std::Pair<unsigned int, unsigned char> const, Aura*> > >::find (this=0x198, __k=@0xb3bd3074) at /usr/include/c++/4.2/bits/stl_tree.h:481 481 (this->_M_impl._M_header._M_parent); CRASH ON Sa 6. Jun 10:13:34 CEST 2009 Using the running image of child Thread 0xb3bd3b90 (LWP 6527). Program stopped at 0x813dd7c. It stopped with signal SIGSEGV, Segmentation fault. Type "info stack" or "info registers" for more information. BACKTRACE #0 std::_Rb_tree<std::Pair<unsigned int, unsigned char>, std::Pair<std::Pair<unsigned int, unsigned char> const, Aura*>, std::_Select1st<std::Pair<std::Pair<unsigned int, unsigned char> const, Aura*> >, std::less<std::Pair<unsigned int, unsigned char> >, std::allocator<std::Pair<std::Pair<unsigned int, unsigned char> const, Aura*> > >::find (this=0x198, __k=@0xb3bd3074) at /usr/include/c++/4.2/bits/stl_tree.h:481 #1 0x083c4169 in Unit::HasAura (this=0x0, spellId=3) at /usr/include/c++/4.2/bits/stl_multimap.h:494 #2 0x083443fb in PlayerbotRogueAI::DoNextCombatManeuver (this=0x12742d70, pTarget=0x12629c38) at ../../../src/game/PlayerbotRogueAI.cpp:66 #3 0x0832d7c4 in PlayerbotAI::DoNextCombatManeuver (this=0x127436f8) at ../../../src/game/PlayerbotAI.cpp:1210 #4 0x0832f2b7 in PlayerbotAI::UpdateAI (this=0x127436f8, p_time=101) at ../../../src/game/PlayerbotAI.cpp:1582 #5 0x0831e19a in Player::Update (this=0x12783888, p_time=101) at ../../../src/game/Player.cpp:1125 #6 0x0826693a in ObjectAccessor::UpdatePlayers (this=0xbd43750, diff=101) at ../../../src/game/ObjectAccessor.cpp:408 #7 0x0825b90b in MapManager::Update (this=0x935f4e0, diff=101) at ../../../src/game/MapManager.cpp:248 #8 0x083fe261 in World::Update (this=0x86479d8, diff=101) at ../../../src/game/World.cpp:1558 #9 0x08134d2a in WorldRunnable::run (this=0x121cb358) at ../../../src/mangosd/WorldRunnable.cpp:65 #10 0x084ba771 in ACE_Based::Thread::ThreadTask (param=0x121cb358) at ../../../src/shared/Threading.cpp:159 #11 0xb7c040b7 in ACE_OS_Thread_Adapter::invoke (this=0x121d1040) at ../../../../dep/ACE_wrappers/ace/OS_Thread_Adapter.cpp:90 #12 0xb7baf8f1 in ace_thread_adapter (args=0x121d1040) at ../../../../dep/ACE_wrappers/ace/Base_Thread_Adapter.cpp:124 #13 0xb78824fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #14 0xb76e0e5e in clone () from /lib/tls/i686/cmov/libc.so.6 Should be this code line: if (pTarget->getVictim()->HasAura(SPELL_AURA_PERIODIC_DAMAGE)) { Hope, this helps greetz walkofdoom
×
×
  • 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