Jump to content

[Feature] [7860]+ Mobs fleeing and getting assistance


Auntie Mangos

Recommended Posts

  • 3 weeks later...
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+

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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.

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