-
Notifications
You must be signed in to change notification settings - Fork 42
AGENT_SIEGE_UPDATE
DummkopfOfHachtenduden edited this page Jul 12, 2021
·
10 revisions
0x385F - SERVER_AGENT_SIEGE_UPDATE
1 byte siegeUpdate
switch(siegeUpdate)
{
case SiegeUpdate.Info:
1 byte siegeCount
foreach(siege)
{
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
2 ushort Guild.Name.Length
* string Guild.Name
4 uint Guild.ID
2 ushort Guild.Leader.Name.Length
* string Guild.Leader.Name
2 ushort Siege.Instruction.Length
* string Siege.Instruction
4 uint Guild.CurCrestRev
4 uint Union.ID
4 uint Union.CurCrestRev
1 byte isEnterCountdownEnabled //UIIT_STT_FORT_ETC_ENTER_COUNTDOWN
if(isEnterCountdownEnabled)
4 uint Countdown //in seconds
1 byte isStoneCooldownEnabled //UIIT_STT_FORT_ETC_ATTACK_FORT_STONE_COUNTDOWN
4 uint Countdown //in seconds
}
1 byte siegePeriod // 0 = SIEGE_DEFAULT_PERIOD, 1 = SIEGE_WAR, 2 = SIEGE_REQUEST_ALLOWED_PERIOD, 4 = SIEGE_TAX_ALLOWED_PERIOD
4 uint owningFortressID // individual for character
break;
case SiegeUpdate.TaxRate:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
2 ushort taxRate
break;
case SiegeUpdate.Occupied:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
2 ushort Guild.Name.Length
* string Guild.Name
2 ushort Guild.Leader.Name.Length
* string Guild.Leader.Name
2 ushort Siege.Instruction.Length
* string Siege.Instruction
4 uint Guild.ID
4 uint Guild.CurCrestRev
4 uint Union.ID
4 uint Union.CurCrestRev
break;
case SiegeUpdate.SealDestroyed:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
break;
case SiegeUpdate.StructureState:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
4 uint structure.UniqueID
4 uint structure.RefEventStructID
2 ushort structure.SiegeStructState
if(TID = 1::2::5::5) //IsSiegeStructHeadquarter
{
2 ushort structure.OccupyingGuild.Name.Length
* string structure.OccupyingGuild.Name
}
break;
case SiegeUpdate.ApplicationApply:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
1 byte siegeRequestType
break;
case SiegeUpdate.ApplicationCancel:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
1 byte siegeRequestType
break;
case SiegeUpdate.BattleRank:
1 byte isSelf //indicates if this is your battleRank update thus saving name
if(isSelf == false)
{
2 ushort Name.Length
* string Name
}
1 byte RankLvl
break;
case SiegeUpdate.StructureInfo:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
1 byte structureCount
foreach(structure)
{
4 uint structure.RefEventStructID
4 uint structure.RefObjID
4 uint structure.CurHP
2 ushort structure.SiegeStructState
1 byte structure.isOccupied
if(isOccupied)
{
2 ushort structure.OccupyingGuild.Name.Length
* string structure.OccupyingGuild.Name
}
}
break;
case SiegeUpdate.DefendingGuilds:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
1 byte guildCount
foreach(guild)
{
4 uint Guild.ID
}
break;
//_SiegeFortressBattleRecord
case SiegeUpdate.BattleRecord:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
4 uint KillCount
4 uint KilledCount
break;
//_SiegeFortress.NPCHired
case SiegeUpdate.EmployedNPC:
4 int Siege.ID // from _RefSiegeFortress (SiegeFortress.txt)
1 byte SiegeNPC
break;
case SiegeUpdate.Reward2:
1 byte Byte0 //message is only triggered if Byte0 == 0
break;
}
See also: