mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Compile bug fixes.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -31,6 +31,7 @@ CMakeLists.txt.user
|
||||
nbproject/
|
||||
.sync.ffs_db
|
||||
*.kate-swp
|
||||
reset.sh
|
||||
|
||||
#
|
||||
# Eclipse
|
||||
|
||||
@@ -35,7 +35,7 @@ class PlayerbotHolder : public PlayerbotAIBase
|
||||
PlayerBotMap::const_iterator GetPlayerBotsBegin() const { return playerBots.begin(); }
|
||||
PlayerBotMap::const_iterator GetPlayerBotsEnd() const { return playerBots.end(); }
|
||||
|
||||
void UpdateAIInternal(uint32 elapsed, bool minimal = false) override { };
|
||||
void UpdateAIInternal() override { }; // unused params "uint32 elapsed, bool minimal = false" - whipowill
|
||||
void UpdateSessions();
|
||||
void HandleBotPackets(WorldSession* session);
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ class WorldPosition : public WorldLocation
|
||||
MapEntry const* getMapEntry();
|
||||
uint32 getInstanceId();
|
||||
Map* getMap();
|
||||
const float getHeight();
|
||||
float getHeight(); // remove const - whipowill
|
||||
|
||||
std::set<Transport*> getTransports(uint32 entry = 0);
|
||||
|
||||
@@ -346,7 +346,7 @@ inline ByteBuffer& operator<<(ByteBuffer& b, WorldPosition& guidP)
|
||||
return b;
|
||||
}
|
||||
|
||||
inline ByteBuffer& operator>>(ByteBuffer& b, WorldPosition& g)
|
||||
inline ByteBuffer& operator>>(ByteBuffer& b) // additional argument "WorldPosition& g" was unused - whipowill
|
||||
{
|
||||
uint32 mapid;
|
||||
float coord_x;
|
||||
@@ -557,7 +557,7 @@ class TravelDestination
|
||||
}
|
||||
|
||||
virtual Quest const* GetQuestTemplate() { return nullptr; }
|
||||
virtual bool isActive(Player* bot) { return false; }
|
||||
virtual bool isActive() { return false; } // unused param "Player* bot" - whipowill
|
||||
|
||||
bool isFull(bool ignoreFull = false);
|
||||
|
||||
@@ -600,13 +600,13 @@ class NullTravelDestination : public TravelDestination
|
||||
|
||||
Quest const* GetQuestTemplate() override { return nullptr; }
|
||||
|
||||
bool isActive(Player* bot) override { return false; }
|
||||
bool isActive() override { return false; } // unused param "Player* bot" - whipowill
|
||||
|
||||
std::string const getName() override { return "NullTravelDestination"; }
|
||||
std::string const getTitle() override { return "no destination"; }
|
||||
|
||||
bool isIn(WorldPosition* pos, float radius = 0.f) override { return true; }
|
||||
bool isOut(WorldPosition* pos, float radius = 0.f) override { return false; }
|
||||
bool isIn() override { return true; } // unused params "WorldPosition* pos, float radius = 0.f" - whipowill
|
||||
bool isOut() override { return false; } // unused params "WorldPosition* pos, float radius = 0.f" - whipowill
|
||||
};
|
||||
|
||||
//A travel target specifically related to a quest.
|
||||
|
||||
@@ -66,7 +66,7 @@ class TravelNodePath
|
||||
//Constructor
|
||||
TravelNodePath(float distance = 0.1f, float extraCost = 0, uint8 pathType = (uint8)TravelNodePathType::walk, uint32 pathObject = 0, bool calculated = false,
|
||||
std::vector<uint8> maxLevelCreature = { 0, 0, 0 }, float swimDistance = 0)
|
||||
: distance(distance), extraCost(extraCost), pathType(TravelNodePathType(pathType)), pathObject(pathObject), calculated(calculated),
|
||||
: extraCost(extraCost), distance(distance), pathType(TravelNodePathType(pathType)), calculated(calculated), pathObject(pathObject), // distance after extra cost, pathObject after calculated - whipowill
|
||||
maxLevelCreature(maxLevelCreature), swimDistance(swimDistance)
|
||||
{
|
||||
if (pathType != (uint8)TravelNodePathType::walk)
|
||||
|
||||
@@ -16,8 +16,8 @@ class Unit;
|
||||
class NextAction
|
||||
{
|
||||
public:
|
||||
NextAction(std::string const name, float relevance = 0.0f) : name(name), relevance(relevance) { }
|
||||
NextAction(NextAction const& o) : name(o.name), relevance(o.relevance) { }
|
||||
NextAction(std::string const name, float relevance = 0.0f) : relevance(relevance), name(name) { } // name after relevance - whipowill
|
||||
NextAction(NextAction const& o) : relevance(o.relevance), name(o.name) { } // name after relevance - whipowill
|
||||
|
||||
std::string const getName() { return name; }
|
||||
float getRelevance() {return relevance;}
|
||||
@@ -43,10 +43,10 @@ class Action : public AiNamedObject
|
||||
Aoe = 2
|
||||
};
|
||||
|
||||
Action(PlayerbotAI* botAI, std::string const name = "action") : verbose(false), AiNamedObject(botAI, name) { }
|
||||
Action(PlayerbotAI* botAI, std::string const name = "action") : AiNamedObject(botAI, name), verbose(false) { } // verbose after ainamedobject - whipowill
|
||||
virtual ~Action(void) { }
|
||||
|
||||
virtual bool Execute(Event event) { return true; }
|
||||
virtual bool Execute() { return true; } // unused param "Event event" - whipowill
|
||||
virtual bool isPossible() { return true; }
|
||||
virtual bool isUseful() { return true; }
|
||||
virtual NextAction** getPrerequisites() { return nullptr; }
|
||||
@@ -71,7 +71,7 @@ class ActionNode
|
||||
{
|
||||
public:
|
||||
ActionNode(std::string const name, NextAction** prerequisites = nullptr, NextAction** alternatives = nullptr, NextAction** continuers = nullptr) :
|
||||
action(nullptr), name(name), prerequisites(prerequisites), alternatives(alternatives), continuers(continuers) { }
|
||||
name(name), action(nullptr), alternatives(alternatives), prerequisites(prerequisites), continuers(continuers) { } // action after name, prereq after alternatives - whipowill
|
||||
|
||||
virtual ~ActionNode()
|
||||
{
|
||||
|
||||
@@ -44,8 +44,8 @@ class Strategy : public PlayerbotAIAware
|
||||
virtual ~Strategy() { }
|
||||
|
||||
virtual NextAction** getDefaultActions() { return nullptr; }
|
||||
virtual void InitTriggers(std::vector<TriggerNode*> &triggers) { }
|
||||
virtual void InitMultipliers(std::vector<Multiplier*> &multipliers) { }
|
||||
virtual void InitTriggers() { } // unused params "std::vector<TriggerNode*> &triggers" - whipowill
|
||||
virtual void InitMultipliers() { } // unused params "std::vector<Multiplier*> &multipliers" - whipowill
|
||||
virtual std::string const getName() = 0;
|
||||
virtual uint32 GetType() const { return STRATEGY_TYPE_GENERIC; }
|
||||
virtual ActionNode* GetAction(std::string const name);
|
||||
|
||||
@@ -19,8 +19,8 @@ class Trigger : public AiNamedObject
|
||||
virtual ~Trigger() { }
|
||||
|
||||
virtual Event Check();
|
||||
virtual void ExternalEvent(std::string const param, Player* owner = nullptr) { }
|
||||
virtual void ExternalEvent(WorldPacket& packet, Player* owner = nullptr) { }
|
||||
virtual void ExternalEvent() { } // unused params "std::string const param, Player* owner = nullptr" - whipowill
|
||||
virtual void ExternalEvent() { } // unused params "WorldPacket& packet, Player* owner = nullptr" - whipowill
|
||||
virtual bool IsActive() { return false; }
|
||||
virtual NextAction** getHandlers() { return nullptr; }
|
||||
void Update() { }
|
||||
@@ -39,7 +39,7 @@ class Trigger : public AiNamedObject
|
||||
class TriggerNode
|
||||
{
|
||||
public:
|
||||
TriggerNode(std::string const name, NextAction** handlers = nullptr) : name(name), handlers(handlers), trigger(nullptr) { }
|
||||
TriggerNode(std::string const name, NextAction** handlers = nullptr) : name(name), trigger(nullptr), handlers(handlers) { } // name after handlers, handlers after trigger - whipowill
|
||||
|
||||
virtual ~TriggerNode()
|
||||
{
|
||||
|
||||
@@ -124,7 +124,7 @@ class DeadTrigger : public Trigger
|
||||
class AoeHealTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
AoeHealTrigger(PlayerbotAI* botAI, std::string const name, std::string const type, int32 count) : Trigger(botAI, name), type(type), count(count) { }
|
||||
AoeHealTrigger(PlayerbotAI* botAI, std::string const name, std::string const type, int32 count) : Trigger(botAI, name), count(count) type(type), { } // type after count - whipowill
|
||||
bool IsActive() override;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user