Fork me on GitHub
latest cmangos classic with playerbot compile error
Post: #1
Hello everyone

I'm using:https://github.com/cmangos/mangos-classic andhttps://github.com/blueboy/portalclassic
I've compiled cmangos with playerbotmany times before,but with the latest i'm getting the error below.

[ 21%] Building CXX object src/game/CMakeFiles/game.dir/playerbot/PlayerbotAI.cpp.o
/home/xxx/231016/mangos/src/game/playerbot/PlayerbotAI.cpp: In member function 'bool PlayerbotAI::CanReceiveSpecificSpell(uint8, Unit*) const':
/home/xxx/231016/mangos/src/game/playerbot/PlayerbotAI.cpp:4151:93: error: 'IsSingleFromSpellSpecificPerTargetPerCaster' was not declared in this scope
eFromSpellSpecificPerTargetPerCaster(SpellSpecific(spec), SpellSpecific(spec)))
^
src/game/CMakeFiles/game.dir/build.make:54: recipe for target 'src/game/CMakeFiles/game.dir/playerbot/PlayerbotAI.cpp.o' failed
make[2]: *** [src/game/CMakeFiles/game.dir/playerbot/PlayerbotAI.cpp.o] Error 1
CMakeFiles/Makefile2:629: recipe for target 'src/game/CMakeFiles/game.dir/all' failed
make[1]: *** [src/game/CMakeFiles/game.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2


Anybody know how i can fix this ?
Reply
Post: #2
Right, so I started working my way through some of the newer code and found a few missing parts.
I've added the missing code and it's compiling now.
However, I have no idea how this will effect the server/gameplay since I imagine the code was removed and replaced to work in another way.
I've tried to work my way through commits and see if I can find out when and why the relevant code was replaced, but haven't been able to figure it it out, so I though i'd ask here.

Can anyone tell me when and why the following code was removed ?

Parts of the relevant missing code is:
------------SpellMgr.h--------------
int32 CompareAuraRanks(uint32 spellId_1, uint32 spellId_2);

// order from less to more strict
bool IsSingleFromSpellSpecificPerTargetPerCaster(SpellSpecific spellSpec1, SpellSpecific spellSpec2);
bool IsSingleFromSpellSpecificSpellRanksPerTarget(SpellSpecific spellSpec1, SpellSpecific spellSpec2);
bool IsSingleFromSpellSpecificPerTarget(SpellSpecific spellSpec1, SpellSpecific spellSpec2);

bool IsPassiveSpell(uint32 spellId);
bool IsPassiveSpell(SpellEntry const* spellProto);


----------SpellMgr.cpp---------

bool IsSingleFromSpellSpecificPerTargetPerCaster(SpellSpecific spellSpec1, SpellSpecific spellSpec2)
{
switch (spellSpec1)
{
case SPELL_BLESSING:
case SPELL_AURA:
case SPELL_STING:
case SPELL_CURSE:
case SPELL_ASPECT:
case SPELL_POSITIVE_SHOUT:
case SPELL_JUDGEMENT:
return spellSpec1 == spellSpec2;
default:
return false;
}
}

// target not allow have more one ranks from spell from spell specific per target
bool IsSingleFromSpellSpecificSpellRanksPerTarget(SpellSpecific spellSpec1, SpellSpecific spellSpec2)
{
switch (spellSpec1)
{
case SPELL_BLESSING:
case SPELL_AURA:
case SPELL_CURSE:
case SPELL_ASPECT:
return spellSpec1 == spellSpec2;
default:
return false;
}
}

bool IsPositiveTarget(uint32 targetA, uint32 targetB)
{
switch (targetA)
{
// non-positive targets
case TARGET_CHAIN_DAMAGE:
case TARGET_ALL_ENEMY_IN_AREA:
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
case TARGET_IN_FRONT_OF_CASTER:
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
case TARGET_CURRENT_ENEMY_COORDINATES:
return false;
// positive or dependent
case TARGET_CASTER_COORDINATES:
return (targetB == TARGET_ALL_PARTY || targetB == TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER);
default:
break;
}
if (targetB)
return IsPositiveTarget(targetB, 0);
return true;
}
Reply
Post: #3
Think I found the why the code was changed:
https://github.com/cmangos/mangos-classi...bb25829277

I don't know how re-adding the code and mixing new and old will affect the game.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [TBC] VMAPS ERROR HNDRXX 3 1,195 03-26-2017, 08:27 AM
Last Post: HNDRXX
  [CLASSIC] make error gorgau 1 706 03-10-2017, 06:39 AM
Last Post: JoseQ
Exclamation [CLASSIC] Playerbot database error? Do I have the wrong classic-db? Wingblade 0 621 02-21-2017, 05:01 PM
Last Post: Wingblade
  [Classic] 1.12.1 scriptdev2 errors MadMax765 1 885 01-16-2017, 07:59 PM
Last Post: vault
  [TBC] Compilation error: linking buddiman 1 887 12-20-2016, 01:29 PM
Last Post: evil@wow
  [WOTLK] compile errors klyxmaster 4 1,595 12-05-2016, 12:18 PM
Last Post: Cyberium
  How to complie Cmangos with boost with Microsoft Visual Studio 2015 on windows 10 MadMax765 14 10,675 12-04-2016, 09:13 PM
Last Post: hunter9
Question [TBC] Cmangos TBC where to download the latest full database ft2085267 5 3,016 11-23-2016, 04:55 AM
Last Post: demago
  [CLASSIC] InstallFullDB.sh error 1054 Wingblade 8 2,614 11-10-2016, 05:55 PM
Last Post: Wingblade
  [WOTLK] Can't compile CManGOS in VS 2015 Erny 3 1,749 11-05-2016, 08:58 PM
Last Post: Meiyo

Forum Jump:


Users browsing this thread: 1 Guest(s)

Continued MaNGOS | Return to Top | | Lite (Archive) Mode | RSS Syndication