refactoring(SAI): add event_param5 and target_param4 (#1324)

This commit is contained in:
Francesco Borzì
2019-01-20 01:02:01 +01:00
committed by GitHub
parent aa66ff8f08
commit 07d5314a8b
6 changed files with 54 additions and 44 deletions

View File

@@ -183,23 +183,25 @@ void SmartAIMgr::LoadSmartAIFromDB()
temp.event.raw.param2 = fields[9].GetUInt32();
temp.event.raw.param3 = fields[10].GetUInt32();
temp.event.raw.param4 = fields[11].GetUInt32();
temp.event.raw.param5 = fields[12].GetUInt32();
temp.action.type = (SMART_ACTION)fields[12].GetUInt8();
temp.action.raw.param1 = fields[13].GetUInt32();
temp.action.raw.param2 = fields[14].GetUInt32();
temp.action.raw.param3 = fields[15].GetUInt32();
temp.action.raw.param4 = fields[16].GetUInt32();
temp.action.raw.param5 = fields[17].GetUInt32();
temp.action.raw.param6 = fields[18].GetUInt32();
temp.action.type = (SMART_ACTION)fields[13].GetUInt8();
temp.action.raw.param1 = fields[14].GetUInt32();
temp.action.raw.param2 = fields[15].GetUInt32();
temp.action.raw.param3 = fields[16].GetUInt32();
temp.action.raw.param4 = fields[17].GetUInt32();
temp.action.raw.param5 = fields[18].GetUInt32();
temp.action.raw.param6 = fields[19].GetUInt32();
temp.target.type = (SMARTAI_TARGETS)fields[19].GetUInt8();
temp.target.raw.param1 = fields[20].GetUInt32();
temp.target.raw.param2 = fields[21].GetUInt32();
temp.target.raw.param3 = fields[22].GetUInt32();
temp.target.x = fields[23].GetFloat();
temp.target.y = fields[24].GetFloat();
temp.target.z = fields[25].GetFloat();
temp.target.o = fields[26].GetFloat();
temp.target.type = (SMARTAI_TARGETS)fields[20].GetUInt8();
temp.target.raw.param1 = fields[21].GetUInt32();
temp.target.raw.param2 = fields[22].GetUInt32();
temp.target.raw.param3 = fields[23].GetUInt32();
temp.target.raw.param4 = fields[24].GetUInt32();
temp.target.x = fields[25].GetFloat();
temp.target.y = fields[26].GetFloat();
temp.target.z = fields[27].GetFloat();
temp.target.o = fields[28].GetFloat();
//check target
if (!IsTargetValid(temp))