aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


server/npc_combat.go (533B)


      1 package main
      2 
      3 import "encoding/binary"
      4 
      5 func npcCombatPacket(character *character) []byte {
      6 	// kkr.dll sub_36083F00/sub_36083FB0: weapon list, initiatives and AggDef.
      7 	var body []byte
      8 	for _, value := range []uint32{2018, character.combatProfile.Weapon[0], character.combatProfile.Weapon[1], 100, uint32(character.level),
      9 		uint32(character.combatProfile.Initiative), 0, 0, 0, uint32(character.combatProfile.AggDef)} {
     10 		body = binary.BigEndian.AppendUint32(body, value)
     11 	}
     12 	return n3Packet(0x1d3c0f1c, 50000, character.id, body)
     13 }