refactor: re-write AOE, add FilterTargets, Update TacArc Reading (#1035)

* Re-write AOE behavior for new filter targets
Update Tacarc to use new filter targets
Added dev commands for skill and attack debugging

* Get all entities by detroyable
rather than controllable physics
Since destroyables are what can be hit

* Re-work filter targets to be 100% live accurate
reduce memory usage by only using one vector and removing invalid entries
get entities in the proximity rather than all entities with des comps in the instance, as was done in live

* remove debuging longs and remove oopsie

* address feedback

* make log more useful

* make filter more flat

* Add some more checks to filter targets
add pvp checks to isenemy

* fix typing

* Add filter target to TacArc and update filter target

* fix double declaration

* Some debugging logs

* Update TacArc reading

* make log clearer

* logs

* Update TacArcBehavior.cpp

* banana

* fix max targets

* remove extreanous parenthesesuuesdsds

* make behavior slot use a real type

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
This commit is contained in:
Aaron Kimbrell
2023-10-09 15:18:51 -05:00
committed by GitHub
parent 471d65707c
commit d8ac148cee
18 changed files with 474 additions and 366 deletions

View File

@@ -1159,7 +1159,7 @@ void GameMessages::SendPlayerReachedRespawnCheckpoint(Entity* entity, const NiPo
SEND_PACKET;
}
void GameMessages::SendAddSkill(Entity* entity, TSkillID skillID, int slotID) {
void GameMessages::SendAddSkill(Entity* entity, TSkillID skillID, BehaviorSlot slotID) {
int AICombatWeight = 0;
bool bFromSkillSet = false;
int castType = 0;
@@ -1189,8 +1189,8 @@ void GameMessages::SendAddSkill(Entity* entity, TSkillID skillID, int slotID) {
bitStream.Write(skillID);
bitStream.Write(slotID != -1);
if (slotID != -1) bitStream.Write(slotID);
bitStream.Write(slotID != BehaviorSlot::Invalid);
if (slotID != BehaviorSlot::Invalid) bitStream.Write(slotID);
bitStream.Write(temporary);

View File

@@ -36,6 +36,7 @@ enum class ePetTamingNotifyType : uint32_t;
enum class eUseItemResponse : uint32_t;
enum class eQuickBuildFailReason : uint32_t;
enum class eRebuildState : uint32_t;
enum class BehaviorSlot : int32_t;
namespace GameMessages {
class PropertyDataMessage;
@@ -119,7 +120,7 @@ namespace GameMessages {
void SendSetPlayerControlScheme(Entity* entity, eControlScheme controlScheme);
void SendPlayerReachedRespawnCheckpoint(Entity* entity, const NiPoint3& position, const NiQuaternion& rotation);
void SendAddSkill(Entity* entity, TSkillID skillID, int slotID);
void SendAddSkill(Entity* entity, TSkillID skillID, BehaviorSlot slotID);
void SendRemoveSkill(Entity* entity, TSkillID skillID);
void SendFinishArrangingWithItem(Entity* entity, const LWOOBJID& buildAreaID);