Compile bug fixes.

This commit is contained in:
whipowill
2022-05-18 14:37:50 -05:00
parent a95f4baba5
commit ad42a32643
8 changed files with 20 additions and 19 deletions

1
.gitignore vendored
View File

@@ -31,6 +31,7 @@ CMakeLists.txt.user
nbproject/ nbproject/
.sync.ffs_db .sync.ffs_db
*.kate-swp *.kate-swp
reset.sh
# #
# Eclipse # Eclipse

View File

@@ -35,7 +35,7 @@ class PlayerbotHolder : public PlayerbotAIBase
PlayerBotMap::const_iterator GetPlayerBotsBegin() const { return playerBots.begin(); } PlayerBotMap::const_iterator GetPlayerBotsBegin() const { return playerBots.begin(); }
PlayerBotMap::const_iterator GetPlayerBotsEnd() const { return playerBots.end(); } 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 UpdateSessions();
void HandleBotPackets(WorldSession* session); void HandleBotPackets(WorldSession* session);

View File

@@ -242,7 +242,7 @@ class WorldPosition : public WorldLocation
MapEntry const* getMapEntry(); MapEntry const* getMapEntry();
uint32 getInstanceId(); uint32 getInstanceId();
Map* getMap(); Map* getMap();
const float getHeight(); float getHeight(); // remove const - whipowill
std::set<Transport*> getTransports(uint32 entry = 0); std::set<Transport*> getTransports(uint32 entry = 0);
@@ -346,7 +346,7 @@ inline ByteBuffer& operator<<(ByteBuffer& b, WorldPosition& guidP)
return b; return b;
} }
inline ByteBuffer& operator>>(ByteBuffer& b, WorldPosition& g) inline ByteBuffer& operator>>(ByteBuffer& b) // additional argument "WorldPosition& g" was unused - whipowill
{ {
uint32 mapid; uint32 mapid;
float coord_x; float coord_x;
@@ -557,7 +557,7 @@ class TravelDestination
} }
virtual Quest const* GetQuestTemplate() { return nullptr; } 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); bool isFull(bool ignoreFull = false);
@@ -600,13 +600,13 @@ class NullTravelDestination : public TravelDestination
Quest const* GetQuestTemplate() override { return nullptr; } 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 getName() override { return "NullTravelDestination"; }
std::string const getTitle() override { return "no destination"; } std::string const getTitle() override { return "no destination"; }
bool isIn(WorldPosition* pos, float radius = 0.f) override { return true; } bool isIn() override { return true; } // unused params "WorldPosition* pos, float radius = 0.f" - whipowill
bool isOut(WorldPosition* pos, float radius = 0.f) override { return false; } bool isOut() override { return false; } // unused params "WorldPosition* pos, float radius = 0.f" - whipowill
}; };
//A travel target specifically related to a quest. //A travel target specifically related to a quest.

View File

@@ -66,7 +66,7 @@ class TravelNodePath
//Constructor //Constructor
TravelNodePath(float distance = 0.1f, float extraCost = 0, uint8 pathType = (uint8)TravelNodePathType::walk, uint32 pathObject = 0, bool calculated = false, 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) 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) maxLevelCreature(maxLevelCreature), swimDistance(swimDistance)
{ {
if (pathType != (uint8)TravelNodePathType::walk) if (pathType != (uint8)TravelNodePathType::walk)

View File

@@ -16,8 +16,8 @@ class Unit;
class NextAction class NextAction
{ {
public: public:
NextAction(std::string const name, float relevance = 0.0f) : name(name), relevance(relevance) { } NextAction(std::string const name, float relevance = 0.0f) : relevance(relevance), name(name) { } // name after relevance - whipowill
NextAction(NextAction const& o) : name(o.name), relevance(o.relevance) { } NextAction(NextAction const& o) : relevance(o.relevance), name(o.name) { } // name after relevance - whipowill
std::string const getName() { return name; } std::string const getName() { return name; }
float getRelevance() {return relevance;} float getRelevance() {return relevance;}
@@ -43,10 +43,10 @@ class Action : public AiNamedObject
Aoe = 2 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 ~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 isPossible() { return true; }
virtual bool isUseful() { return true; } virtual bool isUseful() { return true; }
virtual NextAction** getPrerequisites() { return nullptr; } virtual NextAction** getPrerequisites() { return nullptr; }
@@ -71,7 +71,7 @@ class ActionNode
{ {
public: public:
ActionNode(std::string const name, NextAction** prerequisites = nullptr, NextAction** alternatives = nullptr, NextAction** continuers = nullptr) : 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() virtual ~ActionNode()
{ {

View File

@@ -44,8 +44,8 @@ class Strategy : public PlayerbotAIAware
virtual ~Strategy() { } virtual ~Strategy() { }
virtual NextAction** getDefaultActions() { return nullptr; } virtual NextAction** getDefaultActions() { return nullptr; }
virtual void InitTriggers(std::vector<TriggerNode*> &triggers) { } virtual void InitTriggers() { } // unused params "std::vector<TriggerNode*> &triggers" - whipowill
virtual void InitMultipliers(std::vector<Multiplier*> &multipliers) { } virtual void InitMultipliers() { } // unused params "std::vector<Multiplier*> &multipliers" - whipowill
virtual std::string const getName() = 0; virtual std::string const getName() = 0;
virtual uint32 GetType() const { return STRATEGY_TYPE_GENERIC; } virtual uint32 GetType() const { return STRATEGY_TYPE_GENERIC; }
virtual ActionNode* GetAction(std::string const name); virtual ActionNode* GetAction(std::string const name);

View File

@@ -19,8 +19,8 @@ class Trigger : public AiNamedObject
virtual ~Trigger() { } virtual ~Trigger() { }
virtual Event Check(); virtual Event Check();
virtual void ExternalEvent(std::string const param, Player* owner = nullptr) { } virtual void ExternalEvent() { } // unused params "std::string const param, Player* owner = nullptr" - whipowill
virtual void ExternalEvent(WorldPacket& packet, Player* owner = nullptr) { } virtual void ExternalEvent() { } // unused params "WorldPacket& packet, Player* owner = nullptr" - whipowill
virtual bool IsActive() { return false; } virtual bool IsActive() { return false; }
virtual NextAction** getHandlers() { return nullptr; } virtual NextAction** getHandlers() { return nullptr; }
void Update() { } void Update() { }
@@ -39,7 +39,7 @@ class Trigger : public AiNamedObject
class TriggerNode class TriggerNode
{ {
public: 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() virtual ~TriggerNode()
{ {

View File

@@ -124,7 +124,7 @@ class DeadTrigger : public Trigger
class AoeHealTrigger : public Trigger class AoeHealTrigger : public Trigger
{ {
public: 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; bool IsActive() override;
protected: protected: