mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-17 03:20:06 +00:00
Move buffs from Mob to CombatNPC
This commit is contained in:
parent
7a59248ace
commit
c0e566050b
@ -104,6 +104,8 @@ struct CombatNPC : public BaseNPC, public ICombatant {
|
||||
std::map<AIState, void (*)(CombatNPC*, time_t)> stateHandlers;
|
||||
std::map<AIState, void (*)(CombatNPC*, EntityRef)> transitionHandlers;
|
||||
|
||||
std::unordered_map<int, Buff*> buffs = {};
|
||||
|
||||
CombatNPC(int x, int y, int z, int angle, uint64_t iID, int t, int id, int maxHP)
|
||||
: BaseNPC(angle, iID, t, id), maxHealth(maxHP) {
|
||||
spawnX = x;
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "EntityRef.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
|
||||
struct Group {
|
||||
std::vector<EntityRef> members;
|
||||
@ -14,6 +15,10 @@ struct Group {
|
||||
});
|
||||
return filtered;
|
||||
}
|
||||
EntityRef getLeader() {
|
||||
assert(members.size() > 0);
|
||||
return members[0];
|
||||
}
|
||||
|
||||
Group(EntityRef leader);
|
||||
};
|
||||
|
@ -41,7 +41,6 @@ struct Mob : public CombatNPC {
|
||||
time_t lastDrainTime = 0;
|
||||
int skillStyle = -1; // -1 for nothing, 0-2 for corruption, -2 for eruption
|
||||
int hitX = 0, hitY = 0, hitZ = 0; // for use in ability targeting
|
||||
std::unordered_map<int, Buff*> buffs = {};
|
||||
|
||||
// group
|
||||
int groupLeader = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user