Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/playerbot/PlayerbotFactory.cpp b/playerbot/PlayerbotFactory.cpp
- index 06ca251..bc31f58 100644
- --- a/playerbot/PlayerbotFactory.cpp
- +++ b/playerbot/PlayerbotFactory.cpp
- @@ -1094,15 +1094,25 @@ void PlayerbotFactory::InitAvailableSpells()
- TrainerSpellState state = bot->GetTrainerSpellState(tSpell, reqLevel);
- if (state != TRAINER_SPELL_GREEN)
- continue;
- -
- +#ifdef MANGOS
- + SpellEntry const* proto = sSpellStore.LookupEntry(tSpell->spell);
- +#endif
- +#ifdef CMANGOS
- SpellEntry const* proto = sSpellTemplate.LookupEntry<SpellEntry>(tSpell->spell);
- +#endif
- +
- if (!proto)
- continue;
- Spell* spell = new Spell(bot, proto, false);
- SpellCastTargets targets;
- targets.setUnitTarget(bot);
- +#ifdef MANGOS
- + spell->prepare(&targets);
- +#endif
- +#ifdef CMANGOS
- spell->SpellStart(&targets);
- +#endif
- }
- }
- }
- diff --git a/playerbot/RandomPlayerbotMgr.cpp b/playerbot/RandomPlayerbotMgr.cpp
- index b4cec44..ef516b0 100644
- --- a/playerbot/RandomPlayerbotMgr.cpp
- +++ b/playerbot/RandomPlayerbotMgr.cpp
- @@ -466,7 +466,12 @@ void RandomPlayerbotMgr::PrepareTeleportCache()
- sLog.outBasic("Preparing RPG teleport caches for %d factions...", sFactionTemplateStore.GetNumRows());
- BarGoLink bar(rpgCacheSize);
- +#ifdef MANGOS
- + results = WorldDatabase.PQuery("SELECT map, position_x, position_y, position_z, t.FactionAlliance, t.Name "
- +#endif
- +#ifdef CMANGOS
- results = WorldDatabase.PQuery("SELECT map, position_x, position_y, position_z, t.Faction, t.Name "
- +#endif
- "from creature c inner join creature_template t on c.id = t.entry "
- "where t.NpcFlags & %u <> 0",
- UNIT_NPC_FLAG_INNKEEPER);
- @@ -1176,8 +1181,14 @@ void RandomPlayerbotMgr::ChangeStrategy(Player* player)
- void RandomPlayerbotMgr::RandomTeleportForRpg(Player* bot)
- {
- +#ifdef MANGOS
- + sLog.outDetail("Random teleporting bot %s for RPG (%d locations available)", bot->GetName(), rpgLocsCache[bot->getFactionTemplateEntry()->ID].size());
- + RandomTeleport(bot, rpgLocsCache[bot->getFactionTemplateEntry()->ID]);
- +#endif
- +#ifdef CMANGOS
- sLog.outDetail("Random teleporting bot %s for RPG (%d locations available)", bot->GetName(), rpgLocsCache[bot->GetFactionTemplateEntry()->ID].size());
- RandomTeleport(bot, rpgLocsCache[bot->GetFactionTemplateEntry()->ID]);
- +#endif
- }
- void RandomPlayerbotMgr::Remove(Player* bot)
- diff --git a/playerbot/strategy/actions/MovementActions.cpp b/playerbot/strategy/actions/MovementActions.cpp
- index 1a4c996..bf07030 100644
- --- a/playerbot/strategy/actions/MovementActions.cpp
- +++ b/playerbot/strategy/actions/MovementActions.cpp
- @@ -98,7 +98,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle)
- return true;
- }
- - ai->TellMasterNoFacing("No need to move");
- +/* ai->TellMasterNoFacing("No need to move"); */
- return false;
- }
- diff --git a/playerbot/strategy/actions/TellReputationAction.cpp b/playerbot/strategy/actions/TellReputationAction.cpp
- index 40e955c..1bcaebf 100644
- --- a/playerbot/strategy/actions/TellReputationAction.cpp
- +++ b/playerbot/strategy/actions/TellReputationAction.cpp
- @@ -18,8 +18,12 @@ bool TellReputationAction::Execute(Event event)
- Unit* unit = master->GetMap()->GetUnit(selection);
- if (!unit)
- return false;
- -
- +#ifdef MANGOS
- + const FactionTemplateEntry *factionTemplate = unit->getFactionTemplateEntry();
- +#endif
- +#ifdef CMANGOS
- const FactionTemplateEntry *factionTemplate = unit->GetFactionTemplateEntry();
- +#endif
- uint32 faction = factionTemplate->faction;
- const FactionEntry* entry = sFactionStore.LookupEntry
- #ifdef CMANGOS
- diff --git a/playerbot/strategy/actions/WhoAction.cpp b/playerbot/strategy/actions/WhoAction.cpp
- index 4e19131..1e397ea 100644
- --- a/playerbot/strategy/actions/WhoAction.cpp
- +++ b/playerbot/strategy/actions/WhoAction.cpp
- @@ -89,7 +89,12 @@ string WhoAction::QuerySkill(string text)
- string skillName = chat->formatSkill(skill);
- uint32 spellId = AI_VALUE2(uint32, "spell id", skillName);
- uint16 value = bot->GetSkillValue(skill);
- +#ifdef MANGOS
- + uint16 maxSkill = bot->GetMaxSkillValue(skill);
- +#endif
- +#ifdef CMANGOS
- uint16 maxSkill = bot->GetSkillMax(skill);
- +#endif
- ObjectGuid guid = bot->GetObjectGuid();
- string data = "0";
- out << "|cFFFFFF00|Htrade:" << spellId << ":" << value << ":" << maxSkill << ":"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement