1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-13 11:10:43 +00:00
OpenDiablo2/d2networking/d2netpacket/packet_player_cast.go
David Carrell c6721432a6
412 missle animation (#470)
* 412 - move missle code to game_client and add animation, still buggy

* mostly working casting animation that cancels path

Co-authored-by: carrelda@Davids-MacBook-Pro.local <carrelda@Davids-MacBook-Pro.local>
2020-06-26 20:03:00 -04:00

27 lines
762 B
Go

package d2netpacket
import "github.com/OpenDiablo2/OpenDiablo2/d2networking/d2netpacket/d2netpackettype"
// TODO: Need to handle being on different maps
type CastPacket struct {
SourceEntityID string `json:"sourceEntityId"`
SkillID int `json:"skillId"`
TargetX float64 `json:"targetX"`
TargetY float64 `json:"targetY"`
TargetEntityID string `json:"targetEntityId"`
}
func CreateCastPacket(entityID string, skillID int, targetX, targetY float64) NetPacket {
return NetPacket{
PacketType: d2netpackettype.CastSkill,
PacketData: CastPacket{
SourceEntityID: entityID,
SkillID: skillID,
TargetX: targetX,
TargetY: targetY,
TargetEntityID: "", // TODO implement targeting entities
},
}
}