Jump to content

Recommended Posts

Posted
what about recent changes with eventai? which file will call function instead od mob_event_ai.cpp?

Hello,

Try the same function in the file CreatureEventAi.cpp

m_creature.DoFleeToGetAssistance();

Posted

With mangos [7642] compiled without problems.

In CreatureEventAi.cpp I used

m_creature.DoFleeToGetAssistance();

Instead

m_creature->DoFleeToGetAssistance(); And works. Thanks

  • 3 weeks later...
Posted
found the problem : was me ;)

9>..\\..\\src\\game\\Creature.cpp(525) : error C2661: 'MaNGOS::CreatureLastSearcher<Check>::CreatureLastSearcher' : no overloaded function takes 2 arguments
9>        with
9>        [
9>            Check=MaNGOS::NearestAssistCreatureInCreatureRangeCheck
9>        ]

Got this. I can't see any mistake I've made. Little help?

BTW. Entire function looks liek this:

void Creature::DoFleeToGetAssistance()
{
   if (!getVictim())
       return;

   float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS);
   if (radius >0)
   {
       Creature* pCreature = NULL;

       CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
       Cell cell(p);
       cell.data.Part.reserved = ALL_DISTRICT;
       cell.SetNoCreate();
       MaNGOS::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);
       MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck> searcher(pCreature, u_check);

       TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);

       CellLock<GridReadGuard> cell_lock(cell, p);
       cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap());

       SetNoSearchAssistance(true);
       if(!pCreature)
           SetFeared(true, getVictim()->GetGUID(), 0 ,sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY));
       else
           GetMotionMaster()->MoveSeekAssistance(pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ());
   }
}

Ok, przemratajczak's version didn't even compile. patrik's one did compile, but didn't fix anything.

MaNGOS/0.13.0-DEV (* * Revision 7732 - *) for Win32 (little-endian)

Using script library: ScriptDev2 (for MaNGOS 7723+) Revision * * * (Win32)

Using World DB: UDB 0.11.0 (370) for MaNGOS 7517 with SD2 SQL for rev. 928

Using creature EventAI: ACID 0.0.9 - Full Release for Mangos 7673+

  • 3 weeks later...
Posted

MaNGOS::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);

change to

MaNGOS::NearestAssistCreatureInCreatureRangeCheck u_check(getVictim(), radius);

for 0-12

Posted

zhenya' i tried your fix for 7847-master (not 0-12) i get this:

..\\..\\src\\game\\Creature.cpp(524) : error C2661: 'MaNGOS::NearestAssistCreatureInCreatureRangeCheck::NearestAssistCreatureInCreatureRangeCheck' : no overloaded function takes 2 arguments

  • 3 weeks later...
Posted

Still, it sometimes doesn't work Oo

Tested on Witherbark Trolls:

http://www.wowhead.com/?npc=2557

http://www.wowhead.com/?npc=2556

http://www.wowhead.com/?npc=2555

Run for assistance and when they die in the process, they still slide and are unlootable afterward.

Btw. when they DO get assistance, they come back at you, but walking instead of running.

MaNGOS/0.13.0-DEV (* * Revision 7955 - *) for Win32 (little-endian)
Using script library: ScriptDev2 (for MaNGOS 7951+) Revision [1120] 2009-06-04 22:51:38 (Win32)
Using World DB: UDB 0.11.5 (380) for MaNGOS 7894 with SD2 SQL for rev. 1106
Using creature EventAI: ACID 0.1.0 - Full Release

Posted

Ok.

Some more info: I noticed that they slide on the ground when they die really close to the mob they are running to. They don't reach him (the guy who is supposed to help), but they are in his aggro range (IMO).

EDIT: It just happened with Syndicate Assassin almost reaching a Syndicate Enforcer to help.

Posted

Ah yes, I have applied this patch in the past, but since it haven't been accepted, it got lost as I always make a clean clone. Forgot to thank you and Naicisum for your work. Hope it gets accepted very soon.

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