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
c70205a15b
commit
0dd628717d
@ -104,6 +104,8 @@ struct CombatNPC : public BaseNPC, public ICombatant {
|
|||||||
std::map<AIState, void (*)(CombatNPC*, time_t)> stateHandlers;
|
std::map<AIState, void (*)(CombatNPC*, time_t)> stateHandlers;
|
||||||
std::map<AIState, void (*)(CombatNPC*, EntityRef)> transitionHandlers;
|
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)
|
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) {
|
: BaseNPC(angle, iID, t, id), maxHealth(maxHP) {
|
||||||
spawnX = x;
|
spawnX = x;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "EntityRef.hpp"
|
#include "EntityRef.hpp"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
struct Group {
|
struct Group {
|
||||||
std::vector<EntityRef> members;
|
std::vector<EntityRef> members;
|
||||||
@ -14,6 +15,10 @@ struct Group {
|
|||||||
});
|
});
|
||||||
return filtered;
|
return filtered;
|
||||||
}
|
}
|
||||||
|
EntityRef getLeader() {
|
||||||
|
assert(members.size() > 0);
|
||||||
|
return members[0];
|
||||||
|
}
|
||||||
|
|
||||||
Group(EntityRef leader);
|
Group(EntityRef leader);
|
||||||
};
|
};
|
||||||
|
@ -41,7 +41,6 @@ struct Mob : public CombatNPC {
|
|||||||
time_t lastDrainTime = 0;
|
time_t lastDrainTime = 0;
|
||||||
int skillStyle = -1; // -1 for nothing, 0-2 for corruption, -2 for eruption
|
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
|
int hitX = 0, hitY = 0, hitZ = 0; // for use in ability targeting
|
||||||
std::unordered_map<int, Buff*> buffs = {};
|
|
||||||
|
|
||||||
// group
|
// group
|
||||||
int groupLeader = 0;
|
int groupLeader = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user