Jump to content

Playerbot (archive)


Recommended Posts

Loops won't work. This is called in the UpdateAI method which is part of the master thread. Loops like that would lock the core because you are telling the movement generator what to do. The actual movement happens after you return from UpdateAI.

I'd be nice if the AI could be a little more reactionary based on master's and bots incoming & outgoing packets. I'm sure there is a packet sent to indicate these statuses.

Now that I'm thinking about this I realize I probably left my debug logging on in my last push. I'll deactivate it tonight. I find it most useful to keep the console open displaying the messages sent to/from master & bots while playing in windowed mode.

Link to comment
Share on other sites

  • Replies 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

:confused:

the previous angle is the angle between target and bot

if you need to turn to target then you must set bot to angle

set_angle =mine_angle+angle

If mangos angle is between -pi ... pi or between 0 ... 2pi you need to correct the value

if set_angle > pi set_angle =set_angle - pi

else if set_angle < - pi set_angle =set_angle + pi

or

if set_angle < 0 set_angle =set_angle +2 pi

else if set_angle > 2pi set_angle =set_angle - 2 pi

Propably routine from Ckegg Getangle ( target ...) gives you the angle that i computed in last letter

so you need only the addition and correction i noteed here

I'm pretty sure the is code in the player or unit or object class to deall with this. I think it is called SetFacing or SetOrientation and it can be relative to another world object.

Link to comment
Share on other sites

Thank you, but I'm sorry, I just give you this code (many things are hardcode but some things can be usefull).

I haven't github account and I don't use it for my others projects.

I follow your project and I adandon "my mine" (I cannot be everywhere, I haven't many time to do all)

Link to comment
Share on other sites

Thanks for all the suggestions bout the orientation issue! To cover the facing I added following code in one of my last pushes:

void PlayerbotAI::SetInFront( const Unit* obj ) {
   if( !m_bot->HasInArc( M_PI, obj ) ) {
       m_bot->SetInFront( obj );
       m_bot->SendUpdateToPlayer( m_master );
   }
}

This should be called by ClassAIs in DoNextCombatManeuver and I think I did change the code in every class for this. Well, but it seems that position updates of bot's not always work as expected - shall they send a heartbeat message instead of SendUpdateToPlayer?

And for movement I think I will do something similar to a MovementGenerator... an extra function for movement control. Which manages MoveFollow, MoveChase and own code. With own code I mean (as suggested) calling MoveChase and checking distance on update call, eventually clearing movement if in range.

[EDIT]: @collinsp: you maybe also add the 'howto checkout git / being a contributor' to your first post.

Link to comment
Share on other sites

shall they send a heartbeat message instead of SendUpdateToPlayer?

I think so. I'm thinking it might make sense to set a bot's facing orientation to their target and and location (heartbeat) every 2 seconds or so right at the beginning of the UpdateAI. This would be independent of the normal sleep timer. Clients normally broadcast a ton of movement packets. Bots currently don't.

Link to comment
Share on other sites

I wonder how it is done for creatures and npcs? They always face in the direction of victim. Will check this out later if I get mangos to compile correctly.

Checked out newest Scriptdev2 and now I have to merge latest mangos into our branch. But 'git pull mangos master' just gives me a timeout error? Did I miss something.

Oh and forget my last comment about posting the checkout/contribut howto. Had no time to checkout the wiki before. Now I have. Obsolete suggestions made by me :P

Link to comment
Share on other sites

I have done som work on preist modes like this

mode 1 => Heal and Fight (Default), 2 => Only Heal, 3 => Only Fight

And the commando to send for the change is -> mode number

If its intresting i could use filebeam.

Say it in this forum or a pm ..

// XEQT

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Can you replace tab char by four space and remove "() {" in fonction (to respect a little mangos standard) ? (just suggestion)

I will fix this asap

[/code]Should be this code line:

if (pTarget->getVictim()->HasAura(SPELL_AURA_PERIODIC_DAMAGE)) {

Hope, this helps ;)

greetz

walkofdoom

I found the problem :) thanks for the report

====== update ====================================

- Using standard coding style, makes it more logical and much easier to read.

- fixed rogue victim check

If you are working on playerbot, please try to avoid using indent (tab, or \\t) and use 4 spaces instead.

I know most coding environment will auto indent when you go to next line, but some people may use text editor, which makes code unreadable. (like me, in linux platform)

Also, try to use logical style, don't put everything in the same line, ie:

if (!m_bot) return;

use

if (!m_bot)
   return;

and becareful with brackets and if statements

if (m_bot) {
  m_bot->I_WILL_KILL_MYSELF;
  return true;
} else {
  return false;
}

make it clear so other people can read easier

if (m_bot)
{
  m_bot->I_WILL_KILL_MYSELF;
  return true;
}
else
  return false;

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@walkofdoom: Thanks for the report and found that bot is trying to choose item from receiving multiple reward items.

I also discovered that auto choose reward is way too simple, bot chooses item from the first available reward or the one has the greatest armor value. I believe we can do something like trading feature, bot will tell you what rewards are available and you just link back the item and it will pick the one you requests.

- Fixed a bug that bot is trying to choose item from receiving multiple reward items.

- Quest title localization support

- Now multiple rewards will also report in tooltips upon quest completion.

Link to comment
Share on other sites

@walkofdoom: Thanks for the report

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

Link to comment
Share on other sites

hello all, i have a playerbot update :)

patch info:

update for mangos_botguy.sql

death knight presence fix

updated hunter: buffs, melee, ranged & pet mend fix

added priest missing spells (this should have been done ages ago ...what, im just sayin)

---
diff --git a/mangos_botguy.sql b/mangos_botguy.sql
index 0b2e875..9440b93 100644
--- a/mangos_botguy.sql
+++ b/mangos_botguy.sql
@@ -1 +1 @@
-INSERT INTO `creature_template` VALUES
('99002','0','20','0','20','0','Pappy Looter','The Bot Recruiter',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1400','1900','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','1','0','0','0','bot_giver');
\\ No newline at end of file
+INSERT INTO `creature_template` VALUES
('99002','0','20','0','20','0','Pappy Looter','The Bot Recruiter',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','1','0','0','0','bot_giver');
\\ No newline at end of file
diff --git a/src/game/PlayerbotDeathKnightAI.cpp b/src/game/PlayerbotDeathKnightAI.cpp
index 69acf02..4c5516d 100644
--- a/src/game/PlayerbotDeathKnightAI.cpp
+++ b/src/game/PlayerbotDeathKnightAI.cpp
@@ -23,12 +23,12 @@ PlayerbotDeathKnightAI::PlayerbotDeathKnightAI(Player* const master, Player* con
    STRANGULATE       = ai->getSpellId("strangulate");
    BLOOD_BOIL        = ai->getSpellId("blood boil");
    HEART_STRIKE      = ai->getSpellId("heart strike");
-    UNHOLY_PRESENCE   = ai->getSpellId("unholy presence"); // buffs
-    FROST_PRESENCE    = ai->getSpellId("frost presence");
-    BLOOD_PRESENCE    = ai->getSpellId("blood presence");
-    MARK_OF_BLOOD     = ai->getSpellId("mark of blood");
+    MARK_OF_BLOOD     = ai->getSpellId("mark of blood"); // buffs
    KILLING_MACHINE   = ai->getSpellId("killing machine");
    HORN_OF_WINTER    = ai->getSpellId("horn of winter");
+    UNHOLY_PRESENCE   = 48265; // presence
+    FROST_PRESENCE    = 48263;
+    BLOOD_PRESENCE    = 48266;
}

PlayerbotDeathKnightAI::~PlayerbotDeathKnightAI() {}
@@ -231,7 +231,7 @@ void PlayerbotDeathKnightAI::DoNonCombatActions()

    SpellSequence = SPELL_DK_UNHOLY;

-    // buff myself (Unholy DK) UNHOLY_PRESENCE, HORN_OF_WINTER, DEATH_RUNE_MASTERY
+    // buff myself (Unholy DK) UNHOLY_PRESENCE, HORN_OF_WINTER
    if (UNHOLY_PRESENCE > 0)
        (!m_bot->HasAura(UNHOLY_PRESENCE, 0) && GetAI()->CastSpell (UNHOLY_PRESENCE, *m_bot));

diff --git a/src/game/PlayerbotHunterAI.cpp b/src/game/PlayerbotHunterAI.cpp
index cec91c7..280c13f 100644
--- a/src/game/PlayerbotHunterAI.cpp
+++ b/src/game/PlayerbotHunterAI.cpp
@@ -12,6 +12,9 @@ PlayerbotHunterAI::PlayerbotHunterAI(Player* const master, Player* const bot, Pl
    PET_REVIVE           = ai->getSpellId("revive pet");
    PET_MEND             = ai->getSpellId("mend pet");

+    // PET SKILLS
+    BAD_ATTITUDE         = ai->getSpellId("bad attitude"); // crocolisk
+
    // RANGED COMBAT
    AUTO_SHOT            = ai->getSpellId("auto shot"); // basic ranged hunter fighting
    HUNTERS_MARK         = ai->getSpellId("hunter's mark"); // mark target to get higher ranged combat power
@@ -20,12 +23,12 @@ PlayerbotHunterAI::PlayerbotHunterAI(Player* const master, Player* const bot, Pl
    DISTRACTING_SHOT     = ai->getSpellId("distracting shot");
    MULTI_SHOT           = ai->getSpellId("multi shot");
    SERPENT_STING        = ai->getSpellId("serpent sting");
+    SCORPID_STING        = ai->getSpellId("scorpid sting");

    // MELEE
    RAPTOR_STRIKE        = ai->getSpellId("raptor strike");
    WING_CLIP            = ai->getSpellId("wing clip");
    MONGOOSE_BITE        = ai->getSpellId("mongoose bite");
-    BAD_ATTITUDE         = ai->getSpellId("bad attitude");
    SONIC_BLAST          = ai->getSpellId("sonic blast");
    NETHER_SHOCK         = ai->getSpellId("nether shock");
    DEMORALIZING_SCREECH = ai->getSpellId("demoralizing screech");
@@ -33,10 +36,12 @@ PlayerbotHunterAI::PlayerbotHunterAI(Player* const master, Player* const bot, Pl
    // TRAPS
    BEAR_TRAP            = ai->getSpellId("bear trap");
    FREEZING_TRAP        = ai->getSpellId("freezing trap");
+    IMMOLATION_TRAP      = ai->getSpellId("immolation trap");

    // BUFFS
    ASPECT_OF_THE_HAWK   = ai->getSpellId("aspect of the hawk");
    ASPECT_OF_THE_MONKEY = ai->getSpellId("aspect of the monkey");
+    RAPID_FIRE           = ai->getSpellId("rapid fire");

    m_petSummonFailed = false;
    m_rangedCombat = true;
@@ -70,7 +75,7 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
        if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
        {
            // heal pet when health lower 50%
-            if( PET_MEND>0 && ai->CastSpell(PET_MEND,*m_bot) )
+            if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
            {
                ai->TellMaster( "healing pet" );
                return;
@@ -92,7 +97,7 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
    else if( dist>ATTACK_DISTANCE && !m_rangedCombat )
    {
        // switch to ranged combat
-        m_rangedCombat = false;
+        m_rangedCombat = true;
        // increase ranged attack power...
        ( ASPECT_OF_THE_HAWK>0 && !m_bot->HasAura(ASPECT_OF_THE_HAWK, 0) && ai->CastSpell(ASPECT_OF_THE_HAWK,*m_bot) );
    }
@@ -124,14 +129,20 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
    if( m_rangedCombat )
    {
        out << "Case Ranged";
-        if( HUNTERS_MARK>0 && ai->GetManaPercent()>=3 && !pTarget->HasAura(HUNTERS_MARK,0) && ai->CastSpell(HUNTERS_MARK,*pTarget) )
+        if( HUNTERS_MARK>0 && ai->GetManaPercent()>=2 && !pTarget->HasAura(HUNTERS_MARK,0) && ai->CastSpell(HUNTERS_MARK,*pTarget) )
            out << " > Hunter's Mark";
-        else if( MULTI_SHOT>0 && ai->GetAttackerCount()>=3 && ai->CastSpell(MULTI_SHOT,*pTarget) )
-            out << " > Multi Shot";
+        else if( RAPID_FIRE>0 && !m_bot->HasAura(RAPID_FIRE,0) && ai->CastSpell(RAPID_FIRE,*pTarget) )
+            out << " > Rapid Fire";
+        else if( MULTI_SHOT>0 && ai->GetManaPercent()>=8 && ai->GetAttackerCount()>=3 && ai->CastSpell(MULTI_SHOT,*pTarget) )
+            out << " > Multi-Shot";
        else if( ARCANE_SHOT>0 && ai->GetManaPercent()>=5 && ai->CastSpell(ARCANE_SHOT,*pTarget) )
            out << " > Arcane Shot";
-        else if( CONCUSSIVE_SHOT>0 && ai->GetManaPercent()>=8 && !pTarget->HasAura(CONCUSSIVE_SHOT,0) && ai->CastSpell(CONCUSSIVE_SHOT,*pTarget) )
+        else if( CONCUSSIVE_SHOT>0 && ai->GetManaPercent()>=5 && !pTarget->HasAura(CONCUSSIVE_SHOT,0) && ai->CastSpell(CONCUSSIVE_SHOT,*pTarget) )
            out << " > Concussive Shot";
+        else if( SERPENT_STING>0 && ai->GetManaPercent()>=8 && !pTarget->HasAura(SERPENT_STING,0) && !pTarget->HasAura(SCORPID_STING,0) && ai->CastSpell(SERPENT_STING,*pTarget) )
+            out << " > Serpent Sting";
+        else if( SCORPID_STING>0 && ai->GetManaPercent()>=7 && !pTarget->HasAura(SCORPID_STING,0) && !pTarget->HasAura(SERPENT_STING,0) && ai->CastSpell(SCORPID_STING,*pTarget) )
+            out << " > Scorpid Sting";
        else
            out << " NONE!";
    }
@@ -140,6 +151,22 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
        out << "Case Melee";
        if( RAPTOR_STRIKE>0 && ai->CastSpell(RAPTOR_STRIKE,*pTarget) )
            out << " > Raptor Strike";
+        else if( WING_CLIP>0 && ai->CastSpell(WING_CLIP,*pTarget) )
+            out << " > Wing Clip";
+        else if( MONGOOSE_BITE>0 && ai->CastSpell(MONGOOSE_BITE,*pTarget) )
+            out << " > Mongoose Bite";
+        else if( IMMOLATION_TRAP>0 && !pTarget->HasAura(IMMOLATION_TRAP,0) && !pTarget->HasAura(BEAR_TRAP,0) && ai->CastSpell(IMMOLATION_TRAP,*pTarget) )
+            out << " > Immolation Trap";
+        else if( SONIC_BLAST>0 && ai->CastSpell(SONIC_BLAST,*pTarget) )
+            out << " > Sonic Blast";
+        /*else if( FREEZING_TRAP>0 && !pTarget->HasAura(FREEZING_TRAP,0) && !pTarget->HasAura(BEAR_TRAP,0) && !pTarget->HasAura(IMMOLATION_TRAP,0) && ai->CastSpell(FREEZING_TRAP,*pTarget) )
+            out << " > Freezing Trap";*/
+        else if( NETHER_SHOCK>0 && ai->CastSpell(NETHER_SHOCK,*pTarget) )
+            out << " > Nether Shock";
+        else if( DEMORALIZING_SCREECH>0 && ai->CastSpell(DEMORALIZING_SCREECH,*pTarget) )
+            out << " > Demoralizing Screech";
+        else if( BEAR_TRAP>0 && !pTarget->HasAura(BEAR_TRAP,0) && !pTarget->HasAura(IMMOLATION_TRAP,0) && ai->CastSpell(BEAR_TRAP,*pTarget) )
+            out << " > Bear Trap";
        else
            out << " NONE!";
    }
@@ -216,7 +243,7 @@ void PlayerbotHunterAI::DoNonCombatActions()
        else if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
        {
            // heal pet when health lower 50%
-            if( PET_MEND>0 && ai->CastSpell(PET_MEND,*m_bot) )
+            if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
                ai->TellMaster( "healing pet" );
        }
    }
diff --git a/src/game/PlayerbotHunterAI.h b/src/game/PlayerbotHunterAI.h
index f051c30..fae0b44 100644
--- a/src/game/PlayerbotHunterAI.h
+++ b/src/game/PlayerbotHunterAI.h
@@ -32,10 +32,10 @@ class MANGOS_DLL_SPEC PlayerbotHunterAI : PlayerbotClassAI
        bool m_rangedCombat;

        uint32 PET_SUMMON, PET_DISMISS, PET_REVIVE, PET_MEND;
-        uint32 AUTO_SHOT, HUNTERS_MARK, ARCANE_SHOT, CONCUSSIVE_SHOT, DISTRACTING_SHOT, MULTI_SHOT, SERPENT_STING;
+        uint32 AUTO_SHOT, HUNTERS_MARK, ARCANE_SHOT, CONCUSSIVE_SHOT, DISTRACTING_SHOT, MULTI_SHOT, SERPENT_STING, SCORPID_STING;
        uint32 RAPTOR_STRIKE, WING_CLIP, MONGOOSE_BITE, BAD_ATTITUDE, SONIC_BLAST, NETHER_SHOCK, DEMORALIZING_SCREECH;
-        uint32 BEAR_TRAP, FREEZING_TRAP;
-        uint32 ASPECT_OF_THE_HAWK, ASPECT_OF_THE_MONKEY;
+        uint32 BEAR_TRAP, FREEZING_TRAP, IMMOLATION_TRAP;
+        uint32 ASPECT_OF_THE_HAWK, ASPECT_OF_THE_MONKEY, RAPID_FIRE;
};

#endif
\\ No newline at end of file
diff --git a/src/game/PlayerbotPriestAI.cpp b/src/game/PlayerbotPriestAI.cpp
index 54563ca..0f2a4e6 100644
--- a/src/game/PlayerbotPriestAI.cpp
+++ b/src/game/PlayerbotPriestAI.cpp
@@ -18,6 +18,7 @@ PlayerbotPriestAI::PlayerbotPriestAI(Player* const master, Player* const bot, Pl
    SMITE              = ai->getSpellId("smite");
    CLEARCASTING       = ai->getSpellId("clearcasting");
    HOLY_NOVA          = ai->getSpellId("holy nova");
+    HOLY_FIRE          = ai->getSpellId("holy fire");
    DESPERATE_PRAYER   = ai->getSpellId("desperate prayer");
    PRAYER_OF_HEALING  = ai->getSpellId("prayer of healing");
    CIRCLE_OF_HEALING  = ai->getSpellId("circle of healing");
@@ -51,6 +52,7 @@ PlayerbotPriestAI::PlayerbotPriestAI(Player* const master, Player* const bot, Pl
        DSPIRIT        = ai->getSpellId("divine spirit");

    MASS_DISPEL        = ai->getSpellId("mass dispel");
+    POWER_INFUSION     = ai->getSpellId("power infusion");
}

PlayerbotPriestAI::~PlayerbotPriestAI() {}
-- 

hey collinsp, maybe you could push these changes for me. i tried to push it myself and update playerbot to rev_8001 but i got wrong key error. i pulled the latest mangos revision into playerbot and it works fine. also, i dont know whats wrong with the rogue but its problematic so again i reverted back to the stable rogue and all is good :)

thx to everyone here contributing to playerbot!

Link to comment
Share on other sites

Whats with all the console errors

2009-06-11 23:13:53 ERROR:masterout: SMSG_AURA_UPDATE
2009-06-11 23:13:53 ERROR:masterout: SMSG_AURA_UPDATE
2009-06-11 23:13:54 ERROR:botout: SMSG_PERIODICAURALOG
2009-06-11 23:13:54 ERROR:botout: SMSG_PERIODICAURALOG
2009-06-11 23:13:54 ERROR:masterout: SMSG_PERIODICAURALOG
2009-06-11 23:13:54 ERROR:masterout: SMSG_PERIODICAURALOG
2009-06-11 23:13:54 ERROR:botout: SMSG_POWER_UPDATE
2009-06-11 23:13:54 ERROR:botout: SMSG_POWER_UPDATE
2009-06-11 23:13:54 ERROR:masterout: SMSG_POWER_UPDATE
2009-06-11 23:13:54 ERROR:masterout: SMSG_POWER_UPDATE
2009-06-11 23:13:55 ERROR:botout: SMSG_PERIODICAURALOG
2009-06-11 23:13:55 ERROR:botout: SMSG_PERIODICAURALOG

this is just a few. :o

Link to comment
Share on other sites

Pushed to mangos 8001:)

2009-06-11 23:13:53 ERROR:masterout: SMSG_AURA_UPDATE

2009-06-11 23:13:53 ERROR:masterout: SMSG_AURA_UPDATE

2009-06-11 23:13:54 ERROR:botout: SMSG_PERIODICAURALOG

2009-06-11 23:13:54 ERROR:botout: SMSG_PERIODICAURALOG

2009-06-11 23:13:54 ERROR:masterout: SMSG_PERIODICAURALOG

2009-06-11 23:13:54 ERROR:masterout: SMSG_PERIODICAURALOG

2009-06-11 23:13:54 ERROR:botout: SMSG_POWER_UPDATE

2009-06-11 23:13:54 ERROR:botout: SMSG_POWER_UPDATE

2009-06-11 23:13:54 ERROR:masterout: SMSG_POWER_UPDATE

2009-06-11 23:13:54 ERROR:masterout: SMSG_POWER_UPDATE

2009-06-11 23:13:55 ERROR:botout: SMSG_PERIODICAURALOG

2009-06-11 23:13:55 ERROR:botout: SMSG_PERIODICAURALOG

Still trying to figure out:rolleyes:

fixed conflicts again

Link to comment
Share on other sites

Pushed to mangos 8001:)

Still trying to figure out:rolleyes:

fixed conflicts again

I just finished merging playerbot with the latest mangos. Now to download the patch. This might take a while.

The error messages you are seeing is some debug code I left in my last push. I'll disable it in my next push. If my testing of the new merges is successful and push something tomorrow.

Link to comment
Share on other sites

hey collinsp, maybe you could push these changes for me. i tried to push it myself and update playerbot to rev_8001 but i got wrong key error. i pulled the latest mangos revision into playerbot and it works fine. also, i dont know whats wrong with the rogue but its problematic so again i reverted back to the stable rogue and all is good :)

thx to everyone here contributing to playerbot!

did you follow the guide at:

http://github.com/guides/tell-git-your-user-name-and-email-address

I wish I had time to merge everyones patches but I don't have time to fix my own bugs!

If you still have problems ask more questions and I'll try to answer them when I have time.

Link to comment
Share on other sites

rrtn @ I updated your stuff and thank you

 ---
diff --git a/mangos_botguy.sql b/mangos_botguy.sql
index 0b2e875..9440b93 100644
--- a/mangos_botguy.sql
+++ b/mangos_botguy.sql
@@ -1 +1 @@
-INSERT INTO `creature_template` VALUES
('99002','0','20','0','20','0','Pappy Looter','The Bot Recruiter',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1400','1900','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','1','0','0','0','bot_giver');
\\ No newline at end of file
+INSERT INTO `creature_template` VALUES
('99002','0','20','0','20','0','Pappy Looter','The Bot Recruiter',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','1','0','0','0','bot_giver');
\\ No newline at end of file
diff --git a/src/game/PlayerbotDeathKnightAI.cpp b/src/game/PlayerbotDeathKnightAI.cpp
index 69acf02..4c5516d 100644
--- a/src/game/PlayerbotDeathKnightAI.cpp
+++ b/src/game/PlayerbotDeathKnightAI.cpp
@@ -23,12 +23,12 @@ PlayerbotDeathKnightAI::PlayerbotDeathKnightAI(Player* const master, Player* con
    STRANGULATE       = ai->getSpellId("strangulate");
    BLOOD_BOIL        = ai->getSpellId("blood boil");
    HEART_STRIKE      = ai->getSpellId("heart strike");
-    UNHOLY_PRESENCE   = ai->getSpellId("unholy presence"); // buffs
-    FROST_PRESENCE    = ai->getSpellId("frost presence");
-    BLOOD_PRESENCE    = ai->getSpellId("blood presence");
-    MARK_OF_BLOOD     = ai->getSpellId("mark of blood");
+    MARK_OF_BLOOD     = ai->getSpellId("mark of blood"); // buffs
    KILLING_MACHINE   = ai->getSpellId("killing machine");
    HORN_OF_WINTER    = ai->getSpellId("horn of winter");
+    UNHOLY_PRESENCE   = 48265; // presence
+    FROST_PRESENCE    = 48263;
+    BLOOD_PRESENCE    = 48266;
}

PlayerbotDeathKnightAI::~PlayerbotDeathKnightAI() {}
@@ -231,7 +231,7 @@ void PlayerbotDeathKnightAI::DoNonCombatActions()

    SpellSequence = SPELL_DK_UNHOLY;

-    // buff myself (Unholy DK) UNHOLY_PRESENCE, HORN_OF_WINTER, DEATH_RUNE_MASTERY
+    // buff myself (Unholy DK) UNHOLY_PRESENCE, HORN_OF_WINTER
    if (UNHOLY_PRESENCE > 0)
        (!m_bot->HasAura(UNHOLY_PRESENCE, 0) && GetAI()->CastSpell (UNHOLY_PRESENCE, *m_bot));

diff --git a/src/game/PlayerbotHunterAI.cpp b/src/game/PlayerbotHunterAI.cpp
index cec91c7..280c13f 100644
--- a/src/game/PlayerbotHunterAI.cpp
+++ b/src/game/PlayerbotHunterAI.cpp
@@ -12,6 +12,9 @@ PlayerbotHunterAI::PlayerbotHunterAI(Player* const master, Player* const bot, Pl
    PET_REVIVE           = ai->getSpellId("revive pet");
    PET_MEND             = ai->getSpellId("mend pet");

+    // PET SKILLS
+    BAD_ATTITUDE         = ai->getSpellId("bad attitude"); // crocolisk
+
    // RANGED COMBAT
    AUTO_SHOT            = ai->getSpellId("auto shot"); // basic ranged hunter fighting
    HUNTERS_MARK         = ai->getSpellId("hunter's mark"); // mark target to get higher ranged combat power
@@ -20,12 +23,12 @@ PlayerbotHunterAI::PlayerbotHunterAI(Player* const master, Player* const bot, Pl
    DISTRACTING_SHOT     = ai->getSpellId("distracting shot");
    MULTI_SHOT           = ai->getSpellId("multi shot");
    SERPENT_STING        = ai->getSpellId("serpent sting");
+    SCORPID_STING        = ai->getSpellId("scorpid sting");

    // MELEE
    RAPTOR_STRIKE        = ai->getSpellId("raptor strike");
    WING_CLIP            = ai->getSpellId("wing clip");
    MONGOOSE_BITE        = ai->getSpellId("mongoose bite");
-    BAD_ATTITUDE         = ai->getSpellId("bad attitude");
    SONIC_BLAST          = ai->getSpellId("sonic blast");
    NETHER_SHOCK         = ai->getSpellId("nether shock");
    DEMORALIZING_SCREECH = ai->getSpellId("demoralizing screech");
@@ -33,10 +36,12 @@ PlayerbotHunterAI::PlayerbotHunterAI(Player* const master, Player* const bot, Pl
    // TRAPS
    BEAR_TRAP            = ai->getSpellId("bear trap");
    FREEZING_TRAP        = ai->getSpellId("freezing trap");
+    IMMOLATION_TRAP      = ai->getSpellId("immolation trap");

    // BUFFS
    ASPECT_OF_THE_HAWK   = ai->getSpellId("aspect of the hawk");
    ASPECT_OF_THE_MONKEY = ai->getSpellId("aspect of the monkey");
+    RAPID_FIRE           = ai->getSpellId("rapid fire");

    m_petSummonFailed = false;
    m_rangedCombat = true;
@@ -70,7 +75,7 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
        if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
        {
            // heal pet when health lower 50%
-            if( PET_MEND>0 && ai->CastSpell(PET_MEND,*m_bot) )
+            if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
            {
                ai->TellMaster( "healing pet" );
                return;
@@ -92,7 +97,7 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
    else if( dist>ATTACK_DISTANCE && !m_rangedCombat )
    {
        // switch to ranged combat
-        m_rangedCombat = false;
+        m_rangedCombat = true;
        // increase ranged attack power...
        ( ASPECT_OF_THE_HAWK>0 && !m_bot->HasAura(ASPECT_OF_THE_HAWK, 0) && ai->CastSpell(ASPECT_OF_THE_HAWK,*m_bot) );
    }
@@ -124,14 +129,20 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
    if( m_rangedCombat )
    {
        out << "Case Ranged";
-        if( HUNTERS_MARK>0 && ai->GetManaPercent()>=3 && !pTarget->HasAura(HUNTERS_MARK,0) && ai->CastSpell(HUNTERS_MARK,*pTarget) )
+        if( HUNTERS_MARK>0 && ai->GetManaPercent()>=2 && !pTarget->HasAura(HUNTERS_MARK,0) && ai->CastSpell(HUNTERS_MARK,*pTarget) )
            out << " > Hunter's Mark";
-        else if( MULTI_SHOT>0 && ai->GetAttackerCount()>=3 && ai->CastSpell(MULTI_SHOT,*pTarget) )
-            out << " > Multi Shot";
+        else if( RAPID_FIRE>0 && !m_bot->HasAura(RAPID_FIRE,0) && ai->CastSpell(RAPID_FIRE,*pTarget) )
+            out << " > Rapid Fire";
+        else if( MULTI_SHOT>0 && ai->GetManaPercent()>=8 && ai->GetAttackerCount()>=3 && ai->CastSpell(MULTI_SHOT,*pTarget) )
+            out << " > Multi-Shot";
        else if( ARCANE_SHOT>0 && ai->GetManaPercent()>=5 && ai->CastSpell(ARCANE_SHOT,*pTarget) )
            out << " > Arcane Shot";
-        else if( CONCUSSIVE_SHOT>0 && ai->GetManaPercent()>=8 && !pTarget->HasAura(CONCUSSIVE_SHOT,0) && ai->CastSpell(CONCUSSIVE_SHOT,*pTarget) )
+        else if( CONCUSSIVE_SHOT>0 && ai->GetManaPercent()>=5 && !pTarget->HasAura(CONCUSSIVE_SHOT,0) && ai->CastSpell(CONCUSSIVE_SHOT,*pTarget) )
            out << " > Concussive Shot";
+        else if( SERPENT_STING>0 && ai->GetManaPercent()>=8 && !pTarget->HasAura(SERPENT_STING,0) && !pTarget->HasAura(SCORPID_STING,0) && ai->CastSpell(SERPENT_STING,*pTarget) )
+            out << " > Serpent Sting";
+        else if( SCORPID_STING>0 && ai->GetManaPercent()>=7 && !pTarget->HasAura(SCORPID_STING,0) && !pTarget->HasAura(SERPENT_STING,0) && ai->CastSpell(SCORPID_STING,*pTarget) )
+            out << " > Scorpid Sting";
        else
            out << " NONE!";
    }
@@ -140,6 +151,22 @@ void PlayerbotHunterAI::DoNextCombatManeuver(Unit *pTarget)
        out << "Case Melee";
        if( RAPTOR_STRIKE>0 && ai->CastSpell(RAPTOR_STRIKE,*pTarget) )
            out << " > Raptor Strike";
+        else if( WING_CLIP>0 && ai->CastSpell(WING_CLIP,*pTarget) )
+            out << " > Wing Clip";
+        else if( MONGOOSE_BITE>0 && ai->CastSpell(MONGOOSE_BITE,*pTarget) )
+            out << " > Mongoose Bite";
+        else if( IMMOLATION_TRAP>0 && !pTarget->HasAura(IMMOLATION_TRAP,0) && !pTarget->HasAura(BEAR_TRAP,0) && ai->CastSpell(IMMOLATION_TRAP,*pTarget) )
+            out << " > Immolation Trap";
+        else if( SONIC_BLAST>0 && ai->CastSpell(SONIC_BLAST,*pTarget) )
+            out << " > Sonic Blast";
+        /*else if( FREEZING_TRAP>0 && !pTarget->HasAura(FREEZING_TRAP,0) && !pTarget->HasAura(BEAR_TRAP,0) && !pTarget->HasAura(IMMOLATION_TRAP,0) && ai->CastSpell(FREEZING_TRAP,*pTarget) )
+            out << " > Freezing Trap";*/
+        else if( NETHER_SHOCK>0 && ai->CastSpell(NETHER_SHOCK,*pTarget) )
+            out << " > Nether Shock";
+        else if( DEMORALIZING_SCREECH>0 && ai->CastSpell(DEMORALIZING_SCREECH,*pTarget) )
+            out << " > Demoralizing Screech";
+        else if( BEAR_TRAP>0 && !pTarget->HasAura(BEAR_TRAP,0) && !pTarget->HasAura(IMMOLATION_TRAP,0) && ai->CastSpell(BEAR_TRAP,*pTarget) )
+            out << " > Bear Trap";
        else
            out << " NONE!";
    }
@@ -216,7 +243,7 @@ void PlayerbotHunterAI::DoNonCombatActions()
        else if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
        {
            // heal pet when health lower 50%
-            if( PET_MEND>0 && ai->CastSpell(PET_MEND,*m_bot) )
+            if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
                ai->TellMaster( "healing pet" );
        }
    }
diff --git a/src/game/PlayerbotHunterAI.h b/src/game/PlayerbotHunterAI.h
index f051c30..fae0b44 100644
--- a/src/game/PlayerbotHunterAI.h
+++ b/src/game/PlayerbotHunterAI.h
@@ -32,10 +32,10 @@ class MANGOS_DLL_SPEC PlayerbotHunterAI : PlayerbotClassAI
        bool m_rangedCombat;

        uint32 PET_SUMMON, PET_DISMISS, PET_REVIVE, PET_MEND;
-        uint32 AUTO_SHOT, HUNTERS_MARK, ARCANE_SHOT, CONCUSSIVE_SHOT, DISTRACTING_SHOT, MULTI_SHOT, SERPENT_STING;
+        uint32 AUTO_SHOT, HUNTERS_MARK, ARCANE_SHOT, CONCUSSIVE_SHOT, DISTRACTING_SHOT, MULTI_SHOT, SERPENT_STING, SCORPID_STING;
        uint32 RAPTOR_STRIKE, WING_CLIP, MONGOOSE_BITE, BAD_ATTITUDE, SONIC_BLAST, NETHER_SHOCK, DEMORALIZING_SCREECH;
-        uint32 BEAR_TRAP, FREEZING_TRAP;
-        uint32 ASPECT_OF_THE_HAWK, ASPECT_OF_THE_MONKEY;
+        uint32 BEAR_TRAP, FREEZING_TRAP, IMMOLATION_TRAP;
+        uint32 ASPECT_OF_THE_HAWK, ASPECT_OF_THE_MONKEY, RAPID_FIRE;
};

#endif
\\ No newline at end of file
diff --git a/src/game/PlayerbotPriestAI.cpp b/src/game/PlayerbotPriestAI.cpp
index 54563ca..0f2a4e6 100644
--- a/src/game/PlayerbotPriestAI.cpp
+++ b/src/game/PlayerbotPriestAI.cpp
@@ -18,6 +18,7 @@ PlayerbotPriestAI::PlayerbotPriestAI(Player* const master, Player* const bot, Pl
    SMITE              = ai->getSpellId("smite");
    CLEARCASTING       = ai->getSpellId("clearcasting");
    HOLY_NOVA          = ai->getSpellId("holy nova");
+    HOLY_FIRE          = ai->getSpellId("holy fire");
    DESPERATE_PRAYER   = ai->getSpellId("desperate prayer");
    PRAYER_OF_HEALING  = ai->getSpellId("prayer of healing");
    CIRCLE_OF_HEALING  = ai->getSpellId("circle of healing");
@@ -51,6 +52,7 @@ PlayerbotPriestAI::PlayerbotPriestAI(Player* const master, Player* const bot, Pl

collinsp @ thank you

IF any one has something to add just post it i will put it in...I have time on my hands...

Link to comment
Share on other sites

thanks Winslow & collinsp :)

edit: O_o there are 2 mend pet fixes. i see you missed the 'out of combat' mend pet fix part.

@@ -216,7 +243,7 @@ void PlayerbotHunterAI::DoNonCombatActions()
        else if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
        {
            // heal pet when health lower 50%
-            if( PET_MEND>0 && ai->CastSpell(PET_MEND,*m_bot) )
+            if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
                ai->TellMaster( "healing pet" );
        }
    }

Link to comment
Share on other sites

The latest push removes the debug logging and merges the latest mangos. You will need to upgrade your clients and regenerate your data files. There still a problem with the drop command. I'm working on it. Let me know if you experience any instability.

Link to comment
Share on other sites

@rrtn thank you and sorry i missed that one i added and merged to mangos 8019 and pushed

@collinsp thank you I found ware you did that and now no how to change. Great work

@ckegg thank you

@@ -216,7 +243,7 @@ void PlayerbotHunterAI::DoNonCombatActions()
        else if( ((float)pet->GetHealth()/(float)pet->GetMaxHealth()) < 0.5f )
        {
            // heal pet when health lower 50%
-            if( PET_MEND>0 && ai->CastSpell(PET_MEND,*m_bot) )
+            if( PET_MEND>0 && !pet->HasAura(PET_MEND,0) && ai->CastSpell(PET_MEND,*m_bot) )
                ai->TellMaster( "healing pet" );
        }
    }

I am still very green around the collar :lol:

Link to comment
Share on other sites

server craches sometimes when you remove bot or logout with active one. How this can be fixed? Always last line before crash:

2009-06-15 20:32:39 ERROR:BuildPlayerRepop: player Sol(6219) already has a corpse

different characters, not only this.

p.s. sorry for my english

Link to comment
Share on other sites

server craches sometimes when you remove bot or logout with active one. How this can be fixed? Always last line before crash:

2009-06-15 20:32:39 ERROR:BuildPlayerRepop: player Sol(6219) already has a corpse

different characters, not only this.

p.s. sorry for my english

In PlayerbotAI.cpp


else if( m_botState == BOTSTATE_DEAD )
       {
           // become ghost (mostly taken from Player::BuildPlayerRepop)
           if( !m_bot->GetCorpse() )
               m_bot->CreateCorpse();

I don't think we should be creating corpses. Let Player.cpp do it properly. I'm also see this in PlayerbotAI.h

   typedef struct AttackerInfo
       {
           Unit*    attacker;        // reference to the attacker
           Unit*    victim;          // combatant's current victim

Why are we holding references to Unit objects? Can you guarantee that when you dereference those pointers that memory will still exist? If you decide to store pointers to memory you don't own please comment on the mechanism used to prevent invalid dereferencing.

I think everything we need already exists within the Player, Unit, etc classes.

I'd like to see more code based on reactions from the packets sent to/from the bot and to/from the master.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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