mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-31 04:32:06 +00:00 
			
		
		
		
	Update CDBaseCombatAIComponentTable with complete column structure and add BuffComponent tests
Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
This commit is contained in:
		| @@ -4,11 +4,22 @@ namespace { | ||||
| 	// Default entries for fallback | ||||
| 	CDBaseCombatAIComponent defaultEntry{ | ||||
| 		.id = 1, | ||||
| 		.aggroRadius = 25.0f, | ||||
| 		.behaviorType = 0, | ||||
| 		.combatRoundLength = 5.0f, | ||||
| 		.combatRole = 0, | ||||
| 		.minRoundLength = 3.0f, | ||||
| 		.maxRoundLength = 8.0f, | ||||
| 		.tetherSpeed = 4.0f, | ||||
| 		.pursuitSpeed = 2.0f, | ||||
| 		.combatStartDelay = 0.5f, | ||||
| 		.softTetherRadius = 25.0f, | ||||
| 		.hardTetherRadius = 100.0f, | ||||
| 		.spawnTimer = 0.0f, | ||||
| 		.tetherEffectID = 0, | ||||
| 		.ignoreMediator = false, | ||||
| 		.aggroRadius = 25.0f, | ||||
| 		.ignoreStatReset = false, | ||||
| 		.ignoreParent = false, | ||||
| 	}; | ||||
| } | ||||
|  | ||||
| @@ -35,11 +46,22 @@ void CDBaseCombatAIComponentTable::LoadValuesFromDatabase() { | ||||
| 		CDBaseCombatAIComponent entry; | ||||
|  | ||||
| 		entry.id = tableDataResult.getIntField("id", -1); | ||||
| 		entry.aggroRadius = tableDataResult.getFloatField("aggroRadius", 25.0f); | ||||
| 		entry.behaviorType = tableDataResult.getIntField("behaviorType", 0); | ||||
| 		entry.combatRoundLength = tableDataResult.getFloatField("combatRoundLength", 5.0f); | ||||
| 		entry.combatRole = tableDataResult.getIntField("combatRole", 0); | ||||
| 		entry.minRoundLength = tableDataResult.getFloatField("minRoundLength", 3.0f); | ||||
| 		entry.maxRoundLength = tableDataResult.getFloatField("maxRoundLength", 8.0f); | ||||
| 		entry.tetherSpeed = tableDataResult.getFloatField("tetherSpeed", 4.0f); | ||||
| 		entry.pursuitSpeed = tableDataResult.getFloatField("pursuitSpeed", 2.0f); | ||||
| 		entry.combatStartDelay = tableDataResult.getFloatField("combatStartDelay", 0.5f); | ||||
| 		entry.softTetherRadius = tableDataResult.getFloatField("softTetherRadius", 25.0f); | ||||
| 		entry.hardTetherRadius = tableDataResult.getFloatField("hardTetherRadius", 100.0f); | ||||
| 		entry.spawnTimer = tableDataResult.getFloatField("spawnTimer", 0.0f); | ||||
| 		entry.tetherEffectID = tableDataResult.getIntField("tetherEffectID", 0); | ||||
| 		entry.ignoreMediator = tableDataResult.getIntField("ignoreMediator", 0) != 0; | ||||
| 		entry.aggroRadius = tableDataResult.getFloatField("aggroRadius", 25.0f); | ||||
| 		entry.ignoreStatReset = tableDataResult.getIntField("ignoreStatReset", 0) != 0; | ||||
| 		entry.ignoreParent = tableDataResult.getIntField("ignoreParent", 0) != 0; | ||||
|  | ||||
| 		entries.push_back(entry); | ||||
| 		tableDataResult.nextRow(); | ||||
|   | ||||
| @@ -5,11 +5,22 @@ | ||||
|  | ||||
| struct CDBaseCombatAIComponent { | ||||
| 	int32_t id; | ||||
| 	float aggroRadius; | ||||
| 	int32_t behaviorType; | ||||
| 	float combatRoundLength; | ||||
| 	int32_t combatRole; | ||||
| 	float minRoundLength; | ||||
| 	float maxRoundLength; | ||||
| 	float tetherSpeed; | ||||
| 	float pursuitSpeed; | ||||
| 	float combatStartDelay; | ||||
| 	float softTetherRadius; | ||||
| 	float hardTetherRadius; | ||||
| 	float spawnTimer; | ||||
| 	int32_t tetherEffectID; | ||||
| 	bool ignoreMediator; | ||||
| 	float aggroRadius; | ||||
| 	bool ignoreStatReset; | ||||
| 	bool ignoreParent; | ||||
| }; | ||||
|  | ||||
| class CDBaseCombatAIComponentTable : public CDTable<CDBaseCombatAIComponentTable, std::vector<CDBaseCombatAIComponent>> { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 copilot-swe-agent[bot]
					copilot-swe-agent[bot]