1
0
forked from noxious/server

Added getter & setter functions to all entities

This commit is contained in:
2024-12-26 15:15:18 +01:00
parent 6a27ccff31
commit 691abb7c4f
33 changed files with 1500 additions and 168 deletions

View File

@ -82,4 +82,211 @@ export class Character extends BaseEntity {
@Property()
wisdom = 10
setId(id: number) {
this.id = id
return this
}
getId() {
return this.id
}
setUser(user: User) {
this.user = user
return this
}
getUser() {
return this.user
}
setName(name: string) {
this.name = name
return this
}
getName() {
return this.name
}
setOnline(online: boolean) {
this.online = online
return this
}
getOnline() {
return this.online
}
setRole(role: string) {
this.role = role
return this
}
getRole() {
return this.role
}
setChats(chats: Collection<Chat>) {
this.chats = chats
return this
}
getChats() {
return this.chats
}
setZone(zone: Zone | undefined) {
this.zone = zone
return this
}
getZone() {
return this.zone
}
setPositionX(positionX: number) {
this.positionX = positionX
return this
}
getPositionX() {
return this.positionX
}
setPositionY(positionY: number) {
this.positionY = positionY
return this
}
getPositionY() {
return this.positionY
}
setRotation(rotation: number) {
this.rotation = rotation
return this
}
getRotation() {
return this.rotation
}
setCharacterType(characterType: CharacterType | undefined) {
this.characterType = characterType
return this
}
getCharacterType() {
return this.characterType
}
setCharacterHair(characterHair: CharacterHair | undefined) {
this.characterHair = characterHair
return this
}
getCharacterHair() {
return this.characterHair
}
setItems(items: Collection<CharacterItem>) {
this.items = items
return this
}
getItems() {
return this.items
}
setEquipment(equipment: Collection<CharacterEquipment>) {
this.equipment = equipment
return this
}
getEquipment() {
return this.equipment
}
setAlignment(alignment: number) {
this.alignment = alignment
return this
}
getAlignment() {
return this.alignment
}
setHitpoints(hitpoints: number) {
this.hitpoints = hitpoints
return this
}
getHitpoints() {
return this.hitpoints
}
setMana(mana: number) {
this.mana = mana
return this
}
getMana() {
return this.mana
}
setLevel(level: number) {
this.level = level
return this
}
getLevel() {
return this.level
}
setExperience(experience: number) {
this.experience = experience
return this
}
getExperience() {
return this.experience
}
setStrength(strength: number) {
this.strength = strength
return this
}
getStrength() {
return this.strength
}
setDexterity(dexterity: number) {
this.dexterity = dexterity
return this
}
getDexterity() {
return this.dexterity
}
setIntelligence(intelligence: number) {
this.intelligence = intelligence
return this
}
getIntelligence() {
return this.intelligence
}
setWisdom(wisdom: number) {
this.wisdom = wisdom
return this
}
getWisdom() {
return this.wisdom
}
}