@@ -339,46 +339,6 @@ class NPCEntity : public GameEntity {
339339 void SetBehaviorState (NPCAIState st) { ai_state_ = st; };
340340 void MoveTo (const glm::vec3& destination, float speed_multiplier = 1 .0f );
341341
342- private:
343- NPCType npc_type_;
344- NPCRarity rarity_;
345- NPCFaction faction_;
346- NPCAIState ai_state_;
347-
348- NPCStats npc_stats_;
349- NPCAIProfile ai_profile_;
350- NPCLootTable loot_table_;
351- NPCDialogue dialogue_;
352-
353- // Targeting
354- uint64_t target_id_ = 0 ;
355- std::vector<uint64_t > hate_list_; // Ordered by hate/damage dealt
356- std::unordered_map<uint64_t , float > damage_taken_; // Damage taken from each attacker
357-
358- // AI state tracking
359- float state_timer_ = 0 .0f ;
360- float idle_timer_ = 0 .0f ;
361- float patrol_index_ = 0 .0f ;
362- bool patrol_direction_ = true ; // true = forward, false = backward
363-
364- // Combat tracking
365- float attack_cooldown_ = 0 .0f ;
366- float stun_timer_ = 0 .0f ;
367- float flee_timer_ = 0 .0f ;
368- float summon_cooldown_ = 0 .0f ;
369-
370- // Patrol and movement
371- glm::vec3 spawn_position_;
372- std::queue<glm::vec3> patrol_queue_;
373-
374- // Quests and trade
375- std::vector<std::string> quests_;
376- std::unordered_map<std::string, int > trade_items_;
377-
378- // Special abilities
379- std::vector<std::string> abilities_;
380- std::unordered_map<std::string, float > ability_cooldowns_;
381-
382342 // AI decision making
383343 void UpdateIdle (float delta_time);
384344 void UpdatePatrol (float delta_time);
@@ -432,6 +392,46 @@ class NPCEntity : public GameEntity {
432392 void SaveTradeItemsToJson (nlohmann::json& json) const ;
433393 void LoadTradeItemsFromJson (const nlohmann::json& json);
434394
395+ private:
396+ NPCType npc_type_;
397+ NPCRarity rarity_;
398+ NPCFaction faction_;
399+ NPCAIState ai_state_;
400+
401+ NPCStats npc_stats_;
402+ NPCAIProfile ai_profile_;
403+ NPCLootTable loot_table_;
404+ NPCDialogue dialogue_;
405+
406+ // Targeting
407+ uint64_t target_id_ = 0 ;
408+ std::vector<uint64_t > hate_list_; // Ordered by hate/damage dealt
409+ std::unordered_map<uint64_t , float > damage_taken_; // Damage taken from each attacker
410+
411+ // AI state tracking
412+ float state_timer_ = 0 .0f ;
413+ float idle_timer_ = 0 .0f ;
414+ float patrol_index_ = 0 .0f ;
415+ bool patrol_direction_ = true ; // true = forward, false = backward
416+
417+ // Combat tracking
418+ float attack_cooldown_ = 0 .0f ;
419+ float stun_timer_ = 0 .0f ;
420+ float flee_timer_ = 0 .0f ;
421+ float summon_cooldown_ = 0 .0f ;
422+
423+ // Patrol and movement
424+ glm::vec3 spawn_position_;
425+ std::queue<glm::vec3> patrol_queue_;
426+
427+ // Quests and trade
428+ std::vector<std::string> quests_;
429+ std::unordered_map<std::string, int > trade_items_;
430+
431+ // Special abilities
432+ std::vector<std::string> abilities_;
433+ std::unordered_map<std::string, float > ability_cooldowns_;
434+
435435 // Constants
436436 static constexpr float ATTACK_COOLDOWN_BASE = 2 .0f ;
437437 static constexpr float STUN_DURATION = 1 .0f ;
0 commit comments