Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertPointToLocation(point string) *utils.Location
- func CountConsignmentItems(category, minUpgLevel, maxUpgLevel int, minPrice, maxPrice uint64, ...) (int64, error)
- func DeleteCharacterFromCache(id int)
- func DeleteStatFromCache(id int)
- func DeleteUserFromCache(id string)
- func DoesSlotAffectStats(slotNo int16) bool
- func FindCharactersInServer(server int) (map[int]*Character, error)
- func FindOnlineCharacters() (map[int]*Character, error)
- func GeneratePoint(location *utils.Location) utils.Location
- func GetAllAI() error
- func GetAllNPCs() (map[int]*NPC, error)
- func GetAllPetExps() error
- func GetAllPets() error
- func GetPartyMemberData(c *Character) []byte
- func InitDB() error
- func IsValidUsername(name string) (bool, error)
- func RefreshAIDs() error
- func RemoveFromDropRegister(server int, mapID int16, dropID uint16)
- func UnbanUsers()
- type AI
- func (ai *AI) AIHandler()
- func (ai *AI) Attack() []byte
- func (ai *AI) AttackPet() []byte
- func (ai *AI) CastSkill() []byte
- func (ai *AI) CastSkillToPet() []byte
- func (ai *AI) Create() error
- func (ai *AI) DealDamage(damage int) []byte
- func (ai *AI) DealDamageToPet(damage int) []byte
- func (ai *AI) DropHandler(claimer *Character)
- func (ai *AI) FindClaimer() (*Character, error)
- func (ai *AI) FindTargetCharacterID() (int, error)
- func (ai *AI) FindTargetPetID(characterID int) (*InventorySlot, error)
- func (ai *AI) Move(targetLocation utils.Location, runningMode byte) []byte
- func (ai *AI) MovementHandler(token int64, start, end *utils.Location, speed float64)
- func (ai *AI) RemoveDrop(server int, mapID int16, dropID uint16)
- func (ai *AI) SetCoordinate(coordinate *utils.Location)
- func (ai *AI) ShouldGoBack() bool
- type Buff
- type BuffIcon
- type BuffInfection
- type Character
- func (c *Character) ActivityStatus(remainingTime int)
- func (c *Character) AddExp(amount int64) ([]byte, bool)
- func (c *Character) AddItem(itemToAdd *InventorySlot, slotID int16, lootingDrop bool) (*utils.Packet, int16, error)
- func (c *Character) AdvancedFusion(items []*InventorySlot, special *InventorySlot, prodSlot int16) ([]byte, bool, error)
- func (c *Character) AidStatus() []byte
- func (c *Character) BSProduction(book *InventorySlot, materials []*InventorySlot, special *InventorySlot, ...) ([]byte, error)
- func (c *Character) BSUpgrade(slotID int64, stones []*InventorySlot, luck, protection *InventorySlot, ...) ([]byte, error)
- func (c *Character) BankItems() []byte
- func (c *Character) BuffEffects(stat *Stat) error
- func (c *Character) BuyConsignmentItem(consignmentID int) ([]byte, error)
- func (c *Character) BuySaleItem(saleID uint16, saleSlotID, inventorySlotID int16) ([]byte, error)
- func (c *Character) CalculateDamage(ai *AI, isSkill bool) (int, error)
- func (c *Character) CalculateDamageToPlayer(enemy *Character, isSkill bool) (int, error)
- func (c *Character) CanAttack(enemy *Character) bool
- func (c *Character) CanUse(t int) bool
- func (c *Character) CancelTrade()
- func (c *Character) CastSkill(attackCounter, skillID, targetID int, cX, cY, cZ float64) ([]byte, error)
- func (c *Character) ChangeMap(mapID int16, coordinate *utils.Location, args ...interface{}) ([]byte, error)
- func (c *Character) ClaimConsignmentItem(consignmentID int, isCancel bool) ([]byte, error)
- func (c *Character) ClaimMenu() ([]byte, error)
- func (c *Character) CloseSale() ([]byte, error)
- func (c *Character) CombineItems(where, to int16) (int64, int16, error)
- func (t *Character) CopyInventorySlots() []*InventorySlot
- func (t *Character) Create() error
- func (c *Character) CreateSocket(item, special *InventorySlot, itemSlot, specialSlot int16) ([]byte, error)
- func (t *Character) CreateWithTransaction(tr *gorp.Transaction) error
- func (c *Character) DealDamage(ai *AI, dmg int)
- func (c *Character) DecrementItem(slotID int16, amount uint) *utils.Packet
- func (t *Character) Delete() error
- func (c *Character) Dismantle(item, special *InventorySlot) ([]byte, bool, error)
- func (c *Character) DoesInventoryExpanded() bool
- func (c *Character) DowngradePassiveSkill(slotIndex, skillIndex byte) ([]byte, error)
- func (c *Character) DowngradeSkill(slotIndex, skillIndex byte) ([]byte, error)
- func (c *Character) EndPvP()
- func (c *Character) Extraction(item, special *InventorySlot, itemSlot int16) ([]byte, bool, error)
- func (c *Character) FindFreeSlot() (int16, error)
- func (c *Character) FindFreeSlots(count int) ([]int16, error)
- func (c *Character) FindItemInInventory(callback func(*InventorySlot) bool, itemIDs ...int64) (int16, *InventorySlot, error)
- func (c *Character) GetAppearingItemSlots() []int
- func (c *Character) GetExpAndSkillPts() []byte
- func (c *Character) GetGold() []byte
- func (c *Character) GetGuildData() ([]byte, error)
- func (c *Character) GetHPandChi() []byte
- func (c *Character) GetLevelText() string
- func (c *Character) GetNearbyAIIDs() ([]int, error)
- func (c *Character) GetNearbyCharacters() ([]*Character, error)
- func (c *Character) GetNearbyDrops() ([]int, error)
- func (c *Character) GetNearbyNPCIDs() ([]int, error)
- func (c *Character) GetPTS() []byte
- func (c *Character) GetPetStats() []byte
- func (c *Character) GetStats() ([]byte, error)
- func (c *Character) HandleBuffs()
- func (c *Character) HandleLimitedItems()
- func (c *Character) Handler()
- func (c *Character) HasAidBuff() bool
- func (c *Character) HolyWaterUpgrade(item, holyWater *InventorySlot, itemSlot, holyWaterSlot int16) ([]byte, error)
- func (t *Character) InventorySlots() ([]*InventorySlot, error)
- func (c *Character) ItemEffects(st *Stat, start, end int16) error
- func (c *Character) JobPassives(stat *Stat) error
- func (c *Character) LeaveParty()
- func (c *Character) Logout()
- func (c *Character) LootGold(amount uint64) []byte
- func (c *Character) OnDuelStarted() []byte
- func (c *Character) OpenSale(name string, slotIDs []int16, prices []uint64) ([]byte, error)
- func (c *Character) PetHandler()
- func (c *Character) PickaxeActivated() bool
- func (t *Character) PreInsert(s gorp.SqlExecutor) error
- func (t *Character) PreUpdate(s gorp.SqlExecutor) error
- func (c *Character) RegisterItem(item *InventorySlot, price uint64, itemSlot int16) ([]byte, error)
- func (c *Character) RelicDrop(itemID int64) []byte
- func (c *Character) RemoveItem(slotID int16) ([]byte, error)
- func (c *Character) RemovePassiveSkill(slotIndex, skillIndex byte, bookID int64) ([]byte, error)
- func (c *Character) RemoveSkill(slotIndex byte, bookID int64) ([]byte, error)
- func (c *Character) ReplaceItem(itemID int, where, to int16) ([]byte, error)
- func (c *Character) RespawnCounter(seconds byte)
- func (c *Character) SellItem(itemID, slot, quantity int, unitPrice uint64) ([]byte, error)
- func (t *Character) SetCoordinate(coordinate *utils.Location)
- func (t *Character) SetInventorySlots(slots []*InventorySlot)
- func (c *Character) ShowItems() ([]byte, error)
- func (c *Character) SpawnCharacter() ([]byte, error)
- func (c *Character) SplitItem(where, to, quantity uint16) ([]byte, error)
- func (c *Character) StartPvP(timeLeft int)
- func (c *Character) SwapItems(where, to int16) ([]byte, error)
- func (c *Character) Teleport(coordinate *utils.Location) []byte
- func (c *Character) TogglePet() []byte
- func (t *Character) Update() error
- func (c *Character) UpdatePartyStatus()
- func (c *Character) UpgradePassiveSkill(slotIndex, skillIndex byte) ([]byte, error)
- func (c *Character) UpgradeSkill(slotIndex, skillIndex byte) ([]byte, error)
- func (c *Character) UpgradeSocket(item, socket, special, edit *InventorySlot, ...) ([]byte, error)
- func (c *Character) UseConsumable(item *InventorySlot, slotID int16) ([]byte, error)
- type ConsignmentItem
- type Damage
- type Drop
- type DropInfo
- func (e *DropInfo) Create() error
- func (e *DropInfo) CreateWithTransaction(tr *gorp.Transaction) error
- func (e *DropInfo) Delete() error
- func (e *DropInfo) GetItems() []int
- func (e *DropInfo) GetProbabilities() []int
- func (e *DropInfo) New(id int, items, probabilities []int)
- func (e *DropInfo) Update() error
- type Duel
- type ExpInfo
- type Fusion
- type Gambling
- type Gate
- type Guild
- func (g *Guild) AddMember(member *GuildMember) error
- func (g *Guild) Create() error
- func (g *Guild) CreateWithTransaction(tr *gorp.Transaction) error
- func (g *Guild) Delete() error
- func (g *Guild) GetData(issuer *Character) ([]byte, error)
- func (g *Guild) GetInfo() []byte
- func (g *Guild) GetMember(id int) (*GuildMember, error)
- func (g *Guild) GetMemberInfo(member *Character) []byte
- func (g *Guild) GetMembers() ([]*GuildMember, error)
- func (g *Guild) InformMembers(m *Character)
- func (g *Guild) RemoveMember(id int) error
- func (g *Guild) SetMember(member *GuildMember) error
- func (g *Guild) SetMembers(members []*GuildMember) error
- func (g *Guild) Update() error
- type GuildMember
- type GuildRole
- type HaxCode
- type HtItem
- type InventorySlot
- func (slot *InventorySlot) CreateSocket(slotID int16, count int8) []byte
- func (slot *InventorySlot) Delete() error
- func (slot *InventorySlot) GetData(slotID int16) []byte
- func (slot *InventorySlot) GetPetStats(c *Character) []byte
- func (slot *InventorySlot) GetSockets() []byte
- func (slot *InventorySlot) GetUpgrades() []byte
- func (slot *InventorySlot) Insert() error
- func (slot *InventorySlot) SetSocket(i int, code byte)
- func (slot *InventorySlot) SetSockets(socks []byte)
- func (slot *InventorySlot) SetUpgrade(i int, code byte)
- func (slot *InventorySlot) SetUpgrades(upgs []byte)
- func (slot *InventorySlot) Update() error
- func (slot *InventorySlot) Upgrade(slotID int16, codes ...byte) []byte
- func (slot *InventorySlot) UpgradeSocket(slotID int16, codes []byte) []byte
- type Item
- type ItemMelting
- type JobPassive
- type NPC
- type NPCScript
- type NpcPosition
- type Party
- type PartyMember
- type Pet
- type PetExpInfo
- type PetSlot
- func (pet *PetSlot) AddExp(owner *Character)
- func (pet *PetSlot) Attack(owner *Character) []byte
- func (pet *PetSlot) CastSkill(owner *Character) []byte
- func (pet *PetSlot) FindTargetMobID(owner *Character) (int, error)
- func (pet *PetSlot) Move(targetLocation utils.Location, runningMode byte) []byte
- func (pet *PetSlot) MovementHandler(token int64, start, end *utils.Location, speed float64)
- type PlayerTarget
- type Production
- type ProductionMaterial
- type Relic
- type Sale
- type SaleItem
- type SavePoint
- type Server
- type ServerItem
- type Shop
- type ShopItem
- type SkillInfo
- type SkillSet
- type SkillSlots
- type SkillTuple
- type Skills
- func (e *Skills) Create(c *Character) error
- func (e *Skills) CreateWithTransaction(tr *gorp.Transaction) error
- func (e *Skills) Delete() error
- func (s *Skills) GetPlus(skillID int) (byte, error)
- func (e *Skills) GetSkills() (*SkillSlots, error)
- func (s *Skills) GetSkillsData() ([]byte, error)
- func (e *Skills) SetSkills(slots *SkillSlots) error
- func (e *Skills) Update() error
- type Socket
- func (s *Socket) Add(id string)
- func (s *Socket) OnClose()
- func (s *Socket) ParseHeader(header []byte)
- func (s *Socket) Read()
- func (s *Socket) Remove(id string)
- func (s *Socket) SetPingDuration(duration time.Duration)
- func (s *Socket) SetPingHandler(handler func() error)
- func (s *Socket) Write(data []byte) error
- type Stackable
- type Stat
- type Target
- type Trade
- type Trader
- type User
Constants ¶
View Source
const ( MONK = 0x34 MALE_BLADE = 0x35 FEMALE_BLADE = 0x36 AXE = 0x38 FEMALE_ROD = 0x39 DUAL_BLADE = 0x3B DIVINE_MONK = 0x3E DIVINE_MALE_BLADE = 0x3F DIVINE_FEMALE_BLADE = 0x40 DIVINE_AXE = 0x42 DIVINE_FEMALE_ROD = 0x43 DIVINE_DUAL_BLADE = 0x45 )
View Source
const ( WEAPON_TYPE = iota ARMOR_TYPE HT_ARMOR_TYPE ACC_TYPE PENDENT_TYPE QUEST_TYPE PET_ITEM_TYPE SKILL_BOOK_TYPE PASSIVE_SKILL_BOOK_TYPE POTION_TYPE PET_TYPE PET_POTION_TYPE CHARM_OF_RETURN_TYPE FORTUNE_BOX_TYPE MARBLE_TYPE WRAPPER_BOX_TYPE NPC_SUMMONER_TYPE FIRE_SPIRIT WATER_SPIRIT HOLY_WATER_TYPE FILLER_POTION_TYPE SCALE_TYPE BAG_EXPANSION_TYPE MOVEMENT_SCROLL_TYPE SOCKET_TYPE INGREDIENTS_TYPE DEAD_SPIRIT_INCENSE_TYPE AFFLICTION_TYPE RESET_ART_TYPE RESET_ARTS_TYPE FORM_TYPE UNKNOWN_TYPE )
View Source
const (
SERVER_COUNT = 4
)
Variables ¶
View Source
var ( AIs = make(map[int]*AI) AIsByMap []map[int16][]*AI MOB_MOVEMENT = utils.Packet{0xAA, 0x55, 0x21, 0x00, 0x33, 0x00, 0xBC, 0xDB, 0x9F, 0x41, 0x52, 0x70, 0xA2, 0x41, 0x00, 0x55, 0xAA} MOB_ATTACK = utils.Packet{0xAA, 0x55, 0x0C, 0x00, 0x41, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x55, 0xAA} MOB_SKILL = utils.Packet{0xAA, 0x55, 0x1B, 0x00, 0x42, 0x0A, 0x00, 0xDF, 0x28, 0xFA, 0xBE, 0x01, 0x01, 0x55, 0xAA} MOB_DEAL_DAMAGE = utils.Packet{0xAA, 0x55, 0x28, 0x00, 0x16, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x55, 0xAA} ITEM_DROPPED = utils.Packet{0xAA, 0x55, 0x42, 0x00, 0x67, 0x02, 0x01, 0x01, 0x7A, 0xFB, 0x7B, 0xBF, 0x00, 0xA2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} MOB_APPEARED = utils.Packet{0xAA, 0x55, 0x54, 0x00, 0x31, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x09, 0x57, 0x69, 0x6C, 0x64, 0x20, 0x42, 0x6F, 0x61, 0x72, 0x01, 0x01, 0x8E, 0xE5, 0x38, 0xC0, 0xD9, 0xB8, 0x05, 0xC0, 0x00, 0x00, 0x00, 0x40, 0xFF, 0xFF, 0x00, 0xFC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x55, 0xAA} DROP_DISAPPEARED = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x67, 0x04, 0x55, 0xAA} )
View Source
var ( GenerateID func(*Character) error GeneratePetID func(*Character, *PetSlot) DEAL_DAMAGE = utils.Packet{0xAA, 0x55, 0x18, 0x00, 0x16, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} BAG_EXPANDED = utils.Packet{0xAA, 0x55, 0x17, 0x00, 0xA3, 0x02, 0x01, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x31, 0x37, 0x20, 0x31, 0x31, 0x3A, 0x32, 0x32, 0x3A, 0x30, 0x31, 0x00, 0x55, 0xAA} BANK_ITEMS = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x57, 0x05, 0x01, 0x02, 0x55, 0xAA} CHARACTER_DIED = utils.Packet{0xAA, 0x55, 0x02, 0x00, 0x12, 0x01, 0x55, 0xAA} CHARACTER_SPAWNED = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x21, 0x01, 0xD7, 0xEF, 0xE6, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC9, 0x00, 0x00, 0x00, 0x49, 0x2A, 0xFE, 0x00, 0x20, 0x1C, 0x00, 0x00, 0x02, 0xD2, 0x7E, 0x7F, 0xBF, 0xCD, 0x1A, 0x86, 0x3D, 0x33, 0x33, 0x6B, 0x41, 0xFF, 0xFF, 0x10, 0x27, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xC4, 0x0E, 0x00, 0x00, 0xC8, 0xBB, 0x30, 0x00, 0x00, 0x03, 0xF3, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x49, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x55, 0xAA} EXP_SKILL_PT_CHANGED = utils.Packet{0xAA, 0x55, 0x0D, 0x00, 0x13, 0x55, 0xAA} HP_CHI = utils.Packet{0xAA, 0x55, 0x28, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x55, 0xAA} RESPAWN_COUNTER = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x12, 0x02, 0x01, 0x00, 0x00, 0x55, 0xAA} SHOW_ITEMS = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x59, 0x05, 0x0A, 0x00, 0x00, 0x00, 0x55, 0xAA} TELEPORT_PLAYER = utils.Packet{0xAA, 0x55, 0x09, 0x00, 0x24, 0x55, 0xAA} ITEM_COUNT = utils.Packet{0xAA, 0x55, 0x0C, 0x00, 0x59, 0x04, 0x0A, 0x00, 0x55, 0xAA} GREEN_ITEM_COUNT = utils.Packet{0xAA, 0x55, 0x0A, 0x00, 0x59, 0x19, 0x0A, 0x00, 0x55, 0xAA} ITEM_EXPIRED = utils.Packet{0xAA, 0x55, 0x06, 0x00, 0x69, 0x03, 0x55, 0xAA} ITEM_ADDED = utils.Packet{0xAA, 0x55, 0x1E, 0x00, 0x58, 0x01, 0x0A, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x20, 0x1C, 0x00, 0x00, 0x55, 0xAA} ITEM_LOOTED = utils.Packet{0xAA, 0x55, 0x33, 0x00, 0x59, 0x01, 0x0A, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x11, 0x55, 0xAA} PTS_CHANGED = utils.Packet{0xAA, 0x55, 0x06, 0x00, 0xA2, 0x04, 0x55, 0xAA} GOLD_LOOTED = utils.Packet{0xAA, 0x55, 0x0D, 0x00, 0x59, 0x01, 0x0A, 0x00, 0x02, 0x55, 0xAA} GET_GOLD = utils.Packet{0xAA, 0x55, 0x12, 0x00, 0x63, 0x01, 0x55, 0xAA} MAP_CHANGED = utils.Packet{0xAA, 0x55, 0x02, 0x00, 0x2B, 0x01, 0x55, 0xAA, 0xAA, 0x55, 0x0E, 0x00, 0x73, 0x00, 0x00, 0x00, 0x7A, 0x44, 0x55, 0xAA, 0xAA, 0x55, 0x07, 0x00, 0x01, 0xB9, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x55, 0xAA, 0xAA, 0x55, 0x09, 0x00, 0x24, 0x55, 0xAA, 0xAA, 0x55, 0x03, 0x00, 0xA6, 0x00, 0x00, 0x55, 0xAA, 0xAA, 0x55, 0x02, 0x00, 0xAD, 0x01, 0x55, 0xAA} ITEM_REMOVED = utils.Packet{0xAA, 0x55, 0x0B, 0x00, 0x59, 0x02, 0x0A, 0x00, 0x01, 0x55, 0xAA} SELL_ITEM = utils.Packet{0xAA, 0x55, 0x16, 0x00, 0x58, 0x02, 0x0A, 0x00, 0x20, 0x1C, 0x00, 0x00, 0x55, 0xAA} GET_STATS = utils.Packet{}/* 126 elements not displayed */ ITEM_REPLACEMENT = utils.Packet{0xAA, 0x55, 0x0C, 0x00, 0x59, 0x03, 0x0A, 0x00, 0x55, 0xAA} ITEM_SWAP = utils.Packet{0xAA, 0x55, 0x15, 0x00, 0x59, 0x07, 0x0A, 0x00, 0x00, 0x55, 0xAA} HT_UPG_FAILED = utils.Packet{0xAA, 0x55, 0x31, 0x00, 0x54, 0x02, 0xA7, 0x0F, 0x01, 0x00, 0xA3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} UPG_FAILED = utils.Packet{0xAA, 0x55, 0x09, 0x00, 0x54, 0x02, 0xA2, 0x0F, 0x00, 0x55, 0xAA} PRODUCTION_SUCCESS = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x54, 0x04, 0x08, 0x10, 0x01, 0x55, 0xAA} PRODUCTION_FAILED = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x54, 0x04, 0x09, 0x10, 0x00, 0x55, 0xAA} FUSION_SUCCESS = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x54, 0x09, 0x08, 0x10, 0x01, 0x55, 0xAA} FUSION_FAILED = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x54, 0x09, 0x09, 0x10, 0x00, 0x55, 0xAA} DISMANTLE_SUCCESS = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x54, 0x05, 0x68, 0x10, 0x01, 0x00, 0x55, 0xAA} EXTRACTION_SUCCESS = utils.Packet{0xAA, 0x55, 0xB7, 0x00, 0x54, 0x06, 0xCC, 0x10, 0x01, 0x00, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} HOLYWATER_FAILED = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x54, 0x10, 0x32, 0x11, 0x00, 0x55, 0xAA} HOLYWATER_SUCCESS = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x54, 0x10, 0x31, 0x11, 0x01, 0x55, 0xAA} ITEM_REGISTERED = utils.Packet{0xAA, 0x55, 0x43, 0x00, 0x3D, 0x01, 0x0A, 0x00, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x63, 0x99, 0xEA, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} CLAIM_MENU = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x3D, 0x03, 0x0A, 0x00, 0x55, 0xAA} CONSIGMENT_ITEM_BOUGHT = utils.Packet{0xAA, 0x55, 0x08, 0x00, 0x3D, 0x02, 0x0A, 0x00, 0x55, 0xAA} CONSIGMENT_ITEM_SOLD = utils.Packet{0xAA, 0x55, 0x02, 0x00, 0x3F, 0x00, 0x55, 0xAA} CONSIGMENT_ITEM_CLAIMED = utils.Packet{0xAA, 0x55, 0x0A, 0x00, 0x3D, 0x04, 0x0A, 0x00, 0x01, 0x00, 0x55, 0xAA} SKILL_UPGRADED = utils.Packet{0xAA, 0x55, 0x0B, 0x00, 0x81, 0x02, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} SKILL_DOWNGRADED = utils.Packet{0xAA, 0x55, 0x0E, 0x00, 0x81, 0x03, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} SKILL_REMOVED = utils.Packet{0xAA, 0x55, 0x09, 0x00, 0x81, 0x06, 0x0A, 0x00, 0x00, 0x55, 0xAA} PASSIVE_SKILL_UGRADED = utils.Packet{0xAA, 0x55, 0x06, 0x00, 0x82, 0x02, 0x0A, 0x00, 0x00, 0x00, 0x55, 0xAA} PASSIVE_SKILL_REMOVED = utils.Packet{0xAA, 0x55, 0x09, 0x00, 0x82, 0x04, 0x0A, 0x00, 0x00, 0x55, 0xAA} SKILL_CASTED = utils.Packet{0xAA, 0x55, 0x1D, 0x00, 0x42, 0x0A, 0x00, 0x00, 0x00, 0x01, 0x01, 0x55, 0xAA} TRADE_CANCELLED = utils.Packet{0xAA, 0x55, 0x06, 0x00, 0x53, 0x03, 0xD5, 0x07, 0x7E, 0x02, 0x55, 0xAA} SKILL_BOOK_EXISTS = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x59, 0x04, 0xFA, 0x03, 0x55, 0xAA} INVALID_CHARACTER_TYPE = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x59, 0x04, 0xF2, 0x03, 0x55, 0xAA} NO_SLOTS_FOR_SKILL_BOOK = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x59, 0x04, 0xF3, 0x03, 0x55, 0xAA} OPEN_SALE = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x55, 0x01, 0x0A, 0x00, 0x55, 0xAA} GET_SALE_ITEMS = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x55, 0x03, 0x0A, 0x00, 0x00, 0x55, 0xAA} CLOSE_SALE = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x55, 0x02, 0x0A, 0x00, 0x55, 0xAA} BOUGHT_SALE_ITEM = utils.Packet{0xAA, 0x55, 0x39, 0x00, 0x53, 0x10, 0x0A, 0x00, 0x01, 0x00, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} SOLD_SALE_ITEM = utils.Packet{0xAA, 0x55, 0x10, 0x00, 0x55, 0x07, 0x0A, 0x00, 0x55, 0xAA} BUFF_INFECTION = utils.Packet{0xAA, 0x55, 0x0C, 0x00, 0x4D, 0x02, 0x0A, 0x01, 0x55, 0xAA} BUFF_EXPIRED = utils.Packet{0xAA, 0x55, 0x06, 0x00, 0x4D, 0x03, 0x55, 0xAA} SPLIT_ITEM = utils.Packet{0xAA, 0x55, 0x5C, 0x00, 0x59, 0x09, 0x0A, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} RELIC_DROP = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x71, 0x10, 0x00, 0x55, 0xAA} PVP_FINISHED = utils.Packet{0xAA, 0x55, 0x02, 0x00, 0x2A, 0x05, 0x55, 0xAA} FORM_ACTIVATED = utils.Packet{0xAA, 0x55, 0x05, 0x00, 0x37, 0x55, 0xAA} FORM_DEACTIVATED = utils.Packet{0xAA, 0x55, 0x01, 0x00, 0x38, 0x55, 0xAA} )
View Source
var ( Guilds = make(map[int]*Guild) GUILD_INFO = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x83, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} GUILD_DATA = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x83, 0x0A, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} GUILD_MEMBER_INFO = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x83, 0x08, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x2A, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x32, 0x30, 0x31, 0x38, 0x2D, 0x30, 0x38, 0x2D, 0x32, 0x36, 0x00, 0x55, 0xAA} )
View Source
var ( DROP_LIFETIME = time.Duration(30) * time.Second DROP_RATE = utils.ParseFloat(os.Getenv("DROP_RATE")) EXP_RATE = utils.ParseFloat(os.Getenv("EXP_RATE")) )
View Source
var ( Init = make(chan bool, 1) GetFromRegister func(int, int16, uint16) interface{} RemoveFromRegister func(*Character) RemovePetFromRegister func(c *Character) FindCharacterByPseudoID func(server int, ID uint16) *Character AccUpgrades []byte ArmorUpgrades []byte WeaponUpgrades []byte )
View Source
var ( DropRegister = make([]map[int16]map[uint16]*Drop, SERVER_COUNT+1) ITEM_SLOT = utils.Packet{0xAA, 0x55, 0x2E, 0x00, 0x57, 0x0A, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} ITEM_UPGRADED = utils.Packet{0xAA, 0x55, 0x31, 0x00, 0x54, 0x02, 0xA1, 0x0F, 0x01, 0x00, 0xA2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} SOCKET_OPENED = utils.Packet{0xAA, 0x55, 0x30, 0x00, 0x54, 0x16, 0x0A, 0x00, 0x00, 0xA2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} SOCKET_UPGRADED = utils.Packet{0xAA, 0x55, 0x30, 0x00, 0x54, 0x16, 0x0A, 0x00, 0x00, 0xA2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} PET_STATS = utils.Packet{0xAA, 0x55, 0x12, 0x00, 0x51, 0x08, 0x0A, 0x00, 0x55, 0xAA} SHOW_PET_BUTTON = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x57, 0x05, 0x0A, 0x00, 0x55, 0xAA} DISMISS_PET = utils.Packet{0xAA, 0x55, 0x04, 0x00, 0x51, 0x02, 0x0A, 0x00, 0x55, 0xAA} )
View Source
var ( Items = make(map[int64]*Item) STRRates = []int{400, 350, 300, 250, 200, 175, 150, 125, 100, 75, 50, 40, 30, 20, 15} )
View Source
var ( DKMaps = map[int16][]int16{ 18: {18, 193, 200}, 19: {19, 194, 201}, 25: {25, 195, 202}, 26: {26, 196, 203}, 27: {27, 197, 204}, 29: {29, 198, 205}, 30: {30, 199, 206}, 193: {18, 193, 200}, 194: {19, 194, 201}, 195: {25, 195, 202}, 196: {26, 196, 203}, 197: {27, 197, 204}, 198: {29, 198, 205}, 199: {30, 199, 206}, 200: {18, 193, 200}, 201: {19, 194, 201}, 202: {25, 195, 202}, 203: {26, 196, 203}, 204: {27, 197, 204}, 205: {29, 198, 205}, 206: {30, 199, 206}, } PvPZones = []int16{12, 17, 28, 108, 109, 110, 111, 112} )
View Source
var ( PARTY_DATA = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x52, 0x04, 0x0A, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x55, 0xAA} PARTY_STATUS = utils.Packet{0xAA, 0x55, 0x2A, 0x00, 0x52, 0x07, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xAA} LEFT_PARTY = utils.Packet{0xAA, 0x55, 0x09, 0x00, 0x52, 0x03, 0x0A, 0x00, 0x00, 0x55, 0xAA} PARTY_DISBANDED = utils.Packet{0xAA, 0x55, 0x02, 0x00, 0x52, 0x05, 0x55, 0xAA} )
View Source
var ( SkillInfos = make(map[int]*SkillInfo) SkillInfosByBook = make(map[int64][]*SkillInfo) SkillPoints = make([]uint64, 12000) )
View Source
var ( SkillPTS = map[string]map[int]int{ "fjp": map[int]int{0: 1, 1: 1, 2: 1, 3: 2, 4: 3, 5: 4, 6: 6, 7: 9, 8: 14, 9: 21, 10: 31, 11: 47}, "wd": map[int]int{0: 3, 1: 2, 2: 3, 3: 4, 4: 6, 5: 9, 6: 14, 7: 21, 8: 31, 9: 47, 10: 70, 11: 105}, "sjp": map[int]int{ 0: 1, 1: 2, 2: 3, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 10, 10: 12, 11: 14, 12: 17, 13: 21, 14: 25, 15: 30, 16: 36, 17: 43, 18: 52, 19: 62, 20: 62, 21: 62, 22: 62, 23: 62, 24: 62, 25: 62, 26: 62, 27: 62, 28: 62, 29: 62, 30: 94, 31: 94, 32: 94, 33: 94, 34: 94, 35: 94, 36: 94, 37: 94, 38: 94, 39: 94, 40: 116, 41: 116, 42: 116, 43: 116, 44: 116, 45: 116, 46: 116, 47: 116, 48: 116, 49: 116, }, } COMBAT_SKILL_BOOK = utils.Packet{0xAA, 0x55, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA} PASSIVE_SKILL_BOOK = utils.Packet{0xAA, 0x55, 0x07, 0x00, 0x82, 0x01, 0x00, 0x55, 0xAA} )
View Source
var ( Handler func(*Socket, []byte, uint16) ([]byte, error) Sockets = make(map[string]*Socket) )
View Source
var (
BuffIcons = make(map[int]*BuffIcon)
)
View Source
var (
BuffInfections = make(map[int]*BuffInfection)
)
View Source
var (
CLOCK = utils.Packet{0xAA, 0x55, 0x1E, 0x00, 0x72, 0x01, 0x00, 0x00, 0x03, 0x08, 0x00, 0x16, 0x00, 0x24, 0x00, 0x00, 0x00, 0x55, 0xAA}
)
View Source
var (
Drops = make(map[int]*DropInfo)
)
View Source
var (
EXPs = make(map[int16]*ExpInfo)
)
View Source
var (
Fusions = make(map[int64]*Fusion)
)
View Source
var (
GamblingItems = make(map[int]*Gambling)
)
View Source
var (
Gates = make(map[int]*Gate)
)
View Source
var (
HTItems = make(map[int]*HtItem)
)
View Source
var (
HaxCodes = make(map[int]*HaxCode)
)
View Source
var (
InventoryItems utils.SMap
)
View Source
var (
JobPassives = make(map[int8]*JobPassive)
)
View Source
var (
Meltings = make(map[int]*ItemMelting)
)
View Source
var (
NPCPos []*NpcPosition
)
View Source
var (
NPCScripts = make(map[int]*NPCScript)
)
View Source
var (
NPCs map[int]*NPC
)
View Source
var (
Parties = make(map[string]*Party)
)
View Source
var (
PetExps = make(map[int16]*PetExpInfo)
)
View Source
var (
Pets = make(map[int64]*Pet)
)
View Source
var (
Productions = make(map[int]*Production)
)
View Source
var (
Relics = make(map[int]*Relic)
)
View Source
var (
Sales = make(map[uint16]*Sale)
)
View Source
var (
SavePoints = make(map[uint8]*SavePoint)
)
View Source
var (
ShopItems = make(map[int]*ShopItem)
)
View Source
var (
Shops = make(map[int]*Shop)
)
View Source
var (
Stackables = make(map[int]*Stackable)
)
View Source
var (
Trades = make(map[string]*Trade)
)
Functions ¶
func ConvertPointToLocation ¶
func CountConsignmentItems ¶
func DeleteCharacterFromCache ¶
func DeleteCharacterFromCache(id int)
func DeleteStatFromCache ¶
func DeleteStatFromCache(id int)
func DeleteUserFromCache ¶
func DeleteUserFromCache(id string)
func DoesSlotAffectStats ¶
func FindOnlineCharacters ¶
func GetAllNPCs ¶
func GetAllPetExps ¶
func GetAllPetExps() error
func GetAllPets ¶
func GetAllPets() error
func GetPartyMemberData ¶
func IsValidUsername ¶
func RefreshAIDs ¶
func RefreshAIDs() error
func RemoveFromDropRegister ¶
func UnbanUsers ¶
func UnbanUsers()
Types ¶
type AI ¶
type AI struct { ID int `db:"id" json:"id"` PosID int `db:"pos_id" json:"pos_id"` Server int `db:"server" json:"server"` Faction int `db:"faction" json:"faction"` Map int16 `db:"map" json:"map"` Coordinate string `db:"coordinate" json:"coordinate"` WalkingSpeed float64 `db:"walking_speed" json:"walking_speed"` RunningSpeed float64 `db:"running_speed" json:"running_speed"` DamageDealers utils.SMap `db:"-"` TargetLocation utils.Location `db:"-"` PseudoID uint16 `db:"-"` CHI int `db:"-" json:"chi"` HP int `db:"-" json:"hp"` IsDead bool `db:"-" json:"is_dead"` IsMoving bool `db:"-" json:"is_moving"` MovementToken int64 `db:"-" json:"-"` OnSightPlayers map[int]interface{} `db:"-" json:"players"` PlayersMutex sync.RWMutex `db:"-"` TargetPlayerID int `db:"-" json:"target_player"` TargetPetID int `db:"-" json:"target_pet"` Handler func() `db:"-" json:"-"` Once bool `db:"-"` }
func FindAIByID ¶
func (*AI) CastSkillToPet ¶
func (*AI) DealDamage ¶
func (*AI) DealDamageToPet ¶
func (*AI) DropHandler ¶
func (*AI) FindClaimer ¶
func (*AI) FindTargetCharacterID ¶
func (*AI) FindTargetPetID ¶
func (ai *AI) FindTargetPetID(characterID int) (*InventorySlot, error)
func (*AI) MovementHandler ¶
func (*AI) SetCoordinate ¶
func (*AI) ShouldGoBack ¶
type Buff ¶
type Buff struct { ID int `db:"id" json:"id"` CharacterID int `db:"character_id" json:"character_id"` Name string `db:"name" json:"name"` ATK int `db:"atk" json:"atk"` ATKRate int `db:"atk_rate" json:"atk_rate"` ArtsATK int `db:"arts_atk" json:"arts_atk"` ArtsATKRate int `db:"arts_atk_rate" json:"arts_atk_rate"` PoisonDEF int `db:"poison_def" json:"poison_def"` ParalysisDEF int `db:"paralysis_def" json:"paralysis_def"` ConfusionDEF int `db:"confusion_def" json:"confusion_def"` DEF int `db:"def" json:"def"` DEFRate int `db:"def_rate" json:"def_rate"` ArtsDEF int `db:"arts_def" json:"arts_def"` ArtsDEFRate int `db:"arts_def_rate" json:"arts_def_rate"` Accuracy int `db:"accuracy" json:"accuracy"` Dodge int `db:"dodge" json:"dodge"` MaxHP int `db:"max_hp" json:"max_hp"` HPRecoveryRate int `db:"hp_recovery_rate" json:"hp_recovery_rate"` MaxCHI int `db:"max_chi" json:"max_chi"` CHIRecoveryRate int `db:"chi_recovery_rate" json:"chi_recovery_rate"` STR int `db:"str" json:"str"` DEX int `db:"dex" json:"dex"` INT int `db:"int" json:"int"` EXPMultiplier int `db:"exp_multiplier" json:"exp_multiplier"` DropMultiplier int `db:"drop_multiplier" json:"drop_multiplier"` RunningSpeed float64 `db:"running_speed" json:"running_speed"` StartedAt int64 `db:"started_at" json:"started_at"` Duration int64 `db:"duration" json:"duration"` BagExpansion bool `db:"bag_expansion" json:"bag_expansion"` }
func FindBuffByID ¶
func FindBuffsByCharacterID ¶
func (*Buff) CreateWithTransaction ¶
func (b *Buff) CreateWithTransaction(tr *gorp.Transaction) error
type BuffIcon ¶
func (*BuffIcon) CreateWithTransaction ¶
func (e *BuffIcon) CreateWithTransaction(tr *gorp.Transaction) error
type BuffInfection ¶
type BuffInfection struct { ID int `db:"id"` Name string `db:"name"` PoisonDef int `db:"poison_def"` ParalysisDef int `db:"paralysis_def"` ConfusionDef int `db:"confusion_def"` BaseDef int `db:"base_def"` AdditionalDEF int `db:"additional_def"` ArtsDEF int `db:"arts_def"` AdditionalArtsDEF int `db:"additional_arts_def"` MaxHP int `db:"max_hp"` HPRecoveryRate int `db:"hp_recovery_rate"` STR int `db:"str"` DEX int `db:"dex"` INT int `db:"int"` BaseHP int `db:"base_hp"` AdditionalHP int `db:"additional_hp"` BaseATK int `db:"base_atk"` AdditionalATK int `db:"additional_atk"` BaseArtsATK int `db:"base_arts_atk"` AdditionalArtsATK int `db:"additional_arts_atk"` }
func (*BuffInfection) Create ¶
func (e *BuffInfection) Create() error
func (*BuffInfection) CreateWithTransaction ¶
func (e *BuffInfection) CreateWithTransaction(tr *gorp.Transaction) error
func (*BuffInfection) Delete ¶
func (e *BuffInfection) Delete() error
func (*BuffInfection) Update ¶
func (e *BuffInfection) Update() error
type Character ¶
type Character struct { ID int `db:"id" json:"id"` UserID string `db:"user_id" json:"user_id"` Name string `db:"name" json:"name"` Epoch int64 `db:"epoch" json:"epoch"` Type int `db:"type" json:"type"` Faction int `db:"faction" json:"faction"` Height int `db:"height" json:"height"` Level int `db:"level" json:"level"` Class int `db:"class" json:"class"` IsOnline bool `db:"is_online" json:"is_online"` IsActive bool `db:"is_active" json:"is_active"` Gold uint64 `db:"gold" json:"gold"` Coordinate string `db:"coordinate" json:"coordinate"` Map int16 `db:"map" json:"map"` Exp int64 `db:"exp" json:"exp"` HTVisibility int `db:"ht_visibility" json:"ht_visibility"` WeaponSlot int `db:"weapon_slot" json:"weapon_slot"` RunningSpeed float64 `db:"running_speed" json:"running_speed"` GuildID int `db:"guild_id" json:"guild_id"` ExpMultiplier float64 `db:"exp_multiplier" json:"exp_multiplier"` DropMultiplier float64 `db:"drop_multiplier" json:"drop_multiplier"` Slotbar []byte `db:"slotbar" json:"slotbar"` CreatedAt null.Time `db:"created_at" json:"created_at"` AdditionalExpMultiplier float64 `db:"additional_exp_multiplier" json:"additional_exp_multiplier"` AdditionalDropMultiplier float64 `db:"additional_drop_multiplier" json:"additional_drop_multiplier"` AidMode bool `db:"aid_mode" json:"aid_mode"` AidTime uint32 `db:"aid_time" json:"aid_time"` AddingExp sync.Mutex `db:"-" json:"-"` AddingGold sync.Mutex `db:"-" json:"-"` Looting sync.Mutex `db:"-" json:"-"` AdditionalRunningSpeed float64 `db:"-" json:"-"` InvMutex sync.Mutex `db:"-"` Socket *Socket `db:"-" json:"-"` ExploreWorld func() `db:"-" json:"-"` HasLot bool `db:"-" json:"-"` LastRoar time.Time `db:"-" json:"-"` Meditating bool `db:"-"` MovementToken int64 `db:"-" json:"-"` PseudoID uint16 `db:"-" json:"pseudo_id"` PTS int `db:"-" json:"pts"` OnSight struct { Drops map[int]interface{} `db:"-" json:"drops"` DropsMutex sync.RWMutex Mobs map[int]interface{} `db:"-" json:"mobs"` MobMutex sync.RWMutex `db:"-"` NPCs map[int]interface{} `db:"-" json:"npcs"` NpcMutex sync.RWMutex `db:"-"` Pets map[int]interface{} `db:"-" json:"pets"` PetsMutex sync.RWMutex `db:"-"` Players map[int]interface{} `db:"-" json:"players"` PlayerMutex sync.RWMutex `db:"-"` } `db:"-" json:"on_sight"` PartyID string `db:"-"` Selection int `db:"-" json:"selection"` Targets []*Target `db:"-" json:"target"` TamingAI *AI `db:"-" json:"-"` PlayerTargets []*PlayerTarget `db:"-" json:"player_targets"` TradeID string `db:"-" json:"trade_id"` Invisible bool `db:"-" json:"-"` DetectionMode bool `db:"-" json:"-"` VisitedSaleID uint16 `db:"-" json:"-"` DuelID int `db:"-" json:"-"` DuelStarted bool `db:"-" json:"-"` Respawning bool `db:"-" json:"-"` SkillHistory utils.SMap `db:"-" json:"-"` Morphed bool `db:"-" json:"-"` HandlerCB func() `db:"-"` PetHandlerCB func() `db:"-"` // contains filtered or unexported fields }
func FindCharacterByID ¶
func FindCharacterByName ¶
func FindCharactersByUserID ¶
func FindSaleVisitors ¶
func (*Character) ActivityStatus ¶
func (*Character) AdvancedFusion ¶
func (c *Character) AdvancedFusion(items []*InventorySlot, special *InventorySlot, prodSlot int16) ([]byte, bool, error)
func (*Character) BSProduction ¶
func (c *Character) BSProduction(book *InventorySlot, materials []*InventorySlot, special *InventorySlot, prodSlot int16, bookSlot, specialSlot int16, materialSlots []int16, materialCounts []uint) ([]byte, error)
func (*Character) BSUpgrade ¶
func (c *Character) BSUpgrade(slotID int64, stones []*InventorySlot, luck, protection *InventorySlot, stoneSlots []int64, luckSlot, protectionSlot int64) ([]byte, error)
func (*Character) BuffEffects ¶
func (*Character) BuyConsignmentItem ¶
func (*Character) BuySaleItem ¶
func (*Character) CalculateDamage ¶
func (*Character) CalculateDamageToPlayer ¶
func (*Character) CancelTrade ¶
func (c *Character) CancelTrade()
func (*Character) ClaimConsignmentItem ¶
func (*Character) CombineItems ¶
func (*Character) CopyInventorySlots ¶
func (t *Character) CopyInventorySlots() []*InventorySlot
func (*Character) CreateSocket ¶
func (c *Character) CreateSocket(item, special *InventorySlot, itemSlot, specialSlot int16) ([]byte, error)
func (*Character) CreateWithTransaction ¶
func (t *Character) CreateWithTransaction(tr *gorp.Transaction) error
func (*Character) DealDamage ¶
func (*Character) DecrementItem ¶
func (*Character) Dismantle ¶
func (c *Character) Dismantle(item, special *InventorySlot) ([]byte, bool, error)
func (*Character) DoesInventoryExpanded ¶
func (*Character) DowngradePassiveSkill ¶
func (*Character) DowngradeSkill ¶
func (*Character) Extraction ¶
func (*Character) FindFreeSlot ¶
func (*Character) FindItemInInventory ¶
func (c *Character) FindItemInInventory(callback func(*InventorySlot) bool, itemIDs ...int64) (int16, *InventorySlot, error)
func (*Character) GetAppearingItemSlots ¶
func (*Character) GetExpAndSkillPts ¶
func (*Character) GetGuildData ¶
func (*Character) GetHPandChi ¶
func (*Character) GetLevelText ¶
func (*Character) GetNearbyAIIDs ¶
func (*Character) GetNearbyCharacters ¶
func (*Character) GetNearbyDrops ¶
func (*Character) GetNearbyNPCIDs ¶
func (*Character) GetPetStats ¶
func (*Character) HandleBuffs ¶
func (c *Character) HandleBuffs()
func (*Character) HandleLimitedItems ¶
func (c *Character) HandleLimitedItems()
func (*Character) HasAidBuff ¶
func (*Character) HolyWaterUpgrade ¶
func (c *Character) HolyWaterUpgrade(item, holyWater *InventorySlot, itemSlot, holyWaterSlot int16) ([]byte, error)
func (*Character) InventorySlots ¶
func (t *Character) InventorySlots() ([]*InventorySlot, error)
func (*Character) JobPassives ¶
func (*Character) LeaveParty ¶
func (c *Character) LeaveParty()
func (*Character) OnDuelStarted ¶
func (*Character) PetHandler ¶
func (c *Character) PetHandler()
func (*Character) PickaxeActivated ¶
func (*Character) RegisterItem ¶
func (*Character) RemovePassiveSkill ¶
func (*Character) RemoveSkill ¶
func (*Character) ReplaceItem ¶
func (*Character) RespawnCounter ¶
func (*Character) SetCoordinate ¶
func (*Character) SetInventorySlots ¶
func (t *Character) SetInventorySlots(slots []*InventorySlot)
func (*Character) SpawnCharacter ¶
func (*Character) UpdatePartyStatus ¶
func (c *Character) UpdatePartyStatus()
func (*Character) UpgradePassiveSkill ¶
func (*Character) UpgradeSkill ¶
func (*Character) UpgradeSocket ¶
func (*Character) UseConsumable ¶
func (c *Character) UseConsumable(item *InventorySlot, slotID int16) ([]byte, error)
type ConsignmentItem ¶
type ConsignmentItem struct { ID int `db:"id" json:"id"` SellerID int `db:"seller_id" json:"seller_id"` ItemName string `db:"item_name" json:"item_name"` Quantity int `db:"quantity" json:"quantity"` Price uint64 `db:"price" json:"price"` IsSold bool `db:"is_sold" json:"is_sold"` ExpiresAt null.Time `db:"expires_at" json:"expires_at"` }
func FindConsignmentItemByID ¶
func FindConsignmentItemByID(id int) (*ConsignmentItem, error)
func FindConsignmentItemsBySellerID ¶
func FindConsignmentItemsBySellerID(sellerID int) ([]*ConsignmentItem, error)
func GetConsignmentItems ¶
func (*ConsignmentItem) Create ¶
func (e *ConsignmentItem) Create() error
func (*ConsignmentItem) Delete ¶
func (e *ConsignmentItem) Delete() error
func (*ConsignmentItem) PreInsert ¶
func (e *ConsignmentItem) PreInsert(s gorp.SqlExecutor) error
func (*ConsignmentItem) Update ¶
func (e *ConsignmentItem) Update() error
type Drop ¶
type Drop struct { ID int Server int Map int16 Location utils.Location Item *InventorySlot Claimer *Character }
func GetDropsInMap ¶
func (*Drop) GenerateIDForDrop ¶
type DropInfo ¶
type DropInfo struct { ID int `db:"id"` Items string `db:"items"` Probabilities string `db:"probabilities"` }
func (*DropInfo) CreateWithTransaction ¶
func (e *DropInfo) CreateWithTransaction(tr *gorp.Transaction) error
func (*DropInfo) GetProbabilities ¶
type ExpInfo ¶
type ExpInfo struct { Level int16 `db:"level"` Exp int64 `db:"exp"` SkillPoints int `db:"skill_points"` }
func (*ExpInfo) CreateWithTransaction ¶
func (e *ExpInfo) CreateWithTransaction(tr *gorp.Transaction) error
type Fusion ¶
type Fusion struct { Item1 int64 `db:"item1"` Item2 int64 `db:"item2"` Count2 int16 `db:"count2"` Item3 int64 `db:"item3"` Count3 int16 `db:"count3"` SpecialItem int64 `db:"special_item"` SpecialItemCount int16 `db:"special_item_count"` Probability int `db:"probability"` Cost int64 `db:"cost"` Production int64 `db:"production"` DestroyOnFail bool `db:"destroy_on_fail"` }
func (*Fusion) CreateWithTransaction ¶
func (e *Fusion) CreateWithTransaction(tr *gorp.Transaction) error
type Gambling ¶
func (*Gambling) CreateWithTransaction ¶
func (e *Gambling) CreateWithTransaction(tr *gorp.Transaction) error
type Gate ¶
func (*Gate) CreateWithTransaction ¶
func (e *Gate) CreateWithTransaction(tr *gorp.Transaction) error
type Guild ¶
type Guild struct { ID int `db:"id" json:"id"` LeaderID int `db:"leader_id" json:"leader_id"` Name string `db:"name" json:"name"` MemberCount int16 `db:"member_count" json:"member_count"` Members json.RawMessage `db:"members" json:"members"` Logo []byte `db:"logo" json:"logo"` Description string `db:"description" json:"description"` Announcement string `db:"announcement" json:"announcement"` Faction int16 `db:"faction" json:"faction"` GoldDonation uint64 `db:"gold_donation" json:"gold_donation"` HonorDonation uint64 `db:"honor_donation" json:"honor_donation"` Recognition uint64 `db:"recognition" json:"recognition"` // contains filtered or unexported fields }
func FindGuildByID ¶
func FindGuildByName ¶
func (*Guild) AddMember ¶
func (g *Guild) AddMember(member *GuildMember) error
func (*Guild) CreateWithTransaction ¶
func (g *Guild) CreateWithTransaction(tr *gorp.Transaction) error
func (*Guild) GetMemberInfo ¶
func (*Guild) GetMembers ¶
func (g *Guild) GetMembers() ([]*GuildMember, error)
func (*Guild) InformMembers ¶
func (*Guild) RemoveMember ¶
func (*Guild) SetMember ¶
func (g *Guild) SetMember(member *GuildMember) error
func (*Guild) SetMembers ¶
func (g *Guild) SetMembers(members []*GuildMember) error
type GuildMember ¶
type HaxCode ¶
type HaxCode struct { ID int `db:"id"` Code string `db:"code"` SaleMultiplier int `db:"sale_multiplier"` ExtractionMultiplier int `db:"extraction_multiplier"` ExtractedItem int `db:"extracted_item"` }
func (*HaxCode) CreateWithTransaction ¶
func (e *HaxCode) CreateWithTransaction(tr *gorp.Transaction) error
type HtItem ¶
type HtItem struct { ID int `db:"id"` HTID int `db:"ht_id"` Cash int `db:"cash"` IsActive bool `db:"is_active"` IsNew bool `db:"is_new"` IsPopular bool `db:"is_popular"` }
func (*HtItem) CreateWithTransaction ¶
func (e *HtItem) CreateWithTransaction(tr *gorp.Transaction) error
type InventorySlot ¶
type InventorySlot struct { ID int `db:"id"` UserID null.String `db:"user_id"` CharacterID null.Int `db:"character_id"` ItemID int64 `db:"item_id"` SlotID int16 `db:"slot_id"` Quantity uint `db:"quantity"` Plus uint8 `db:"plus"` UpgradeArr string `db:"upgrades"` SocketCount int8 `db:"socket_count"` SocketArr string `db:"sockets"` Activated bool `db:"activated"` InUse bool `db:"in_use"` PetInfo json.RawMessage `db:"pet_info"` UpdatedAt null.Time `db:"updated_at"` Consignment bool `db:"consignment"` Pet *PetSlot `db:"-" json:"-"` RFU interface{} `db:"-" json:"-"` }
func FindBankSlotsByUserID ¶
func FindBankSlotsByUserID(userID string) ([]*InventorySlot, error)
func FindInventorySlotByID ¶
func FindInventorySlotByID(id int) (*InventorySlot, error)
func FindInventorySlotsByCharacterID ¶
func FindInventorySlotsByCharacterID(characterID int) ([]*InventorySlot, error)
func NewSlot ¶
func NewSlot() *InventorySlot
func (*InventorySlot) CreateSocket ¶
func (slot *InventorySlot) CreateSocket(slotID int16, count int8) []byte
func (*InventorySlot) Delete ¶
func (slot *InventorySlot) Delete() error
func (*InventorySlot) GetData ¶
func (slot *InventorySlot) GetData(slotID int16) []byte
func (*InventorySlot) GetPetStats ¶
func (slot *InventorySlot) GetPetStats(c *Character) []byte
func (*InventorySlot) GetSockets ¶
func (slot *InventorySlot) GetSockets() []byte
func (*InventorySlot) GetUpgrades ¶
func (slot *InventorySlot) GetUpgrades() []byte
func (*InventorySlot) Insert ¶
func (slot *InventorySlot) Insert() error
func (*InventorySlot) SetSocket ¶
func (slot *InventorySlot) SetSocket(i int, code byte)
func (*InventorySlot) SetSockets ¶
func (slot *InventorySlot) SetSockets(socks []byte)
func (*InventorySlot) SetUpgrade ¶
func (slot *InventorySlot) SetUpgrade(i int, code byte)
func (*InventorySlot) SetUpgrades ¶
func (slot *InventorySlot) SetUpgrades(upgs []byte)
func (*InventorySlot) Update ¶
func (slot *InventorySlot) Update() error
func (*InventorySlot) Upgrade ¶
func (slot *InventorySlot) Upgrade(slotID int16, codes ...byte) []byte
func (*InventorySlot) UpgradeSocket ¶
func (slot *InventorySlot) UpgradeSocket(slotID int16, codes []byte) []byte
type Item ¶
type Item struct { ID int64 `db:"id"` Name string `db:"name"` UIF string `db:"uif"` Type int16 `db:"type"` HtType int16 `db:"ht_type"` TimerType int16 `db:"timer_type"` Timer int `db:"timer"` BuyPrice int64 `db:"buy_price"` SellPrice int64 `db:"sell_price"` Slot int `db:"slot"` MinLevel int `db:"min_level"` MaxLevel int `db:"max_level"` BaseDef1 int `db:"base_def1"` BaseDef2 int `db:"base_def2"` BaseDef3 int `db:"base_def3"` BaseMinAtk int `db:"base_min_atk"` BaseMaxAtk int `db:"base_max_atk"` STR int `db:"str"` DEX int `db:"dex"` INT int `db:"int"` Wind int `db:"wind"` Water int `db:"water"` Fire int `db:"fire"` MaxHp int `db:"max_hp"` MaxChi int `db:"max_chi"` MinAtk int `db:"min_atk"` MaxAtk int `db:"max_atk"` AtkRate int `db:"atk_rate"` MinArtsAtk int `db:"min_arts_atk"` MaxArtsAtk int `db:"max_arts_atk"` ArtsAtkRate int `db:"arts_atk_rate"` Def int `db:"def"` DefRate int `db:"def_rate"` ArtsDef int `db:"arts_def"` ArtsDefRate int `db:"arts_def_rate"` Accuracy int `db:"accuracy"` Dodge int `db:"dodge"` HpRecovery int `db:"hp_recovery"` ChiRecovery int `db:"chi_recovery"` HolyWaterUpg1 int `db:"holy_water_upg1"` HolyWaterUpg2 int `db:"holy_water_upg2"` HolyWaterUpg3 int `db:"holy_water_upg3"` HolyWaterRate1 int `db:"holy_water_rate1"` HolyWaterRate2 int `db:"holy_water_rate2"` HolyWaterRate3 int `db:"holy_water_rate3"` CharacterType int `db:"character_type"` ExpRate float64 `db:"exp_rate"` DropRate float64 `db:"drop_rate"` Tradable bool `db:"tradable"` MinUpgradeLevel int16 `db:"min_upgrade_level"` NPCID int `db:"npc_id"` RunningSpeed float64 `db:"running_speed"` }
func (*Item) CreateWithTransaction ¶
func (item *Item) CreateWithTransaction(tr *gorp.Transaction) error
type ItemMelting ¶
type ItemMelting struct { ID int `db:"id"` MeltedItems string `db:"melted_items"` ItemCounts string `db:"item_counts"` ProfitMultiplier float64 `db:"profit_multiplier"` Probability int `db:"probability"` Cost int64 `db:"cost"` SpecialItem int `db:"special_item"` SpecialProbability int `db:"special_probability"` // contains filtered or unexported fields }
func (*ItemMelting) Create ¶
func (e *ItemMelting) Create() error
func (*ItemMelting) CreateWithTransaction ¶
func (e *ItemMelting) CreateWithTransaction(tr *gorp.Transaction) error
func (*ItemMelting) Delete ¶
func (e *ItemMelting) Delete() error
func (*ItemMelting) GetItemCounts ¶
func (e *ItemMelting) GetItemCounts() ([]int, error)
func (*ItemMelting) GetMeltedItems ¶
func (e *ItemMelting) GetMeltedItems() ([]int, error)
type JobPassive ¶
type JobPassive struct { ID int8 `db:"id"` MaxHp int `db:"max_hp"` MaxChi int `db:"max_chi"` ATK int `db:"atk"` ArtsATK int `db:"arts_atk"` DEF int `db:"def"` ArtsDef int `db:"arts_def"` Accuracy int `db:"accuracy"` Dodge int `db:"dodge"` }
func (*JobPassive) Create ¶
func (p *JobPassive) Create() error
func (*JobPassive) CreateWithTransaction ¶
func (p *JobPassive) CreateWithTransaction(tr *gorp.Transaction) error
func (*JobPassive) Delete ¶
func (p *JobPassive) Delete() error
func (*JobPassive) Update ¶
func (p *JobPassive) Update() error
type NPC ¶
type NPC struct { ID int `db:"id"` Name string `db:"name"` Level int16 `db:"level"` Exp int64 `db:"exp"` DivineExp int64 `db:"divine_exp"` DarknessExp int64 `db:"darkness_exp"` GoldDrop int `db:"gold_drop"` DEF int `db:"def"` MaxHp int `db:"max_hp"` MinATK int `db:"min_atk"` MaxATK int `db:"max_atk"` MinArtsATK int `db:"min_arts_atk"` MaxArtsATK int `db:"max_arts_atk"` ArtsDEF int `db:"arts_def"` DropID int `db:"drop_id"` SkillID int `db:"skill_id"` }
func FindNPCByID ¶
func (*NPC) CreateWithTransaction ¶
func (e *NPC) CreateWithTransaction(tr *gorp.Transaction) error
type NPCScript ¶
func (*NPCScript) CreateWithTransaction ¶
func (e *NPCScript) CreateWithTransaction(tr *gorp.Transaction) error
type NpcPosition ¶
type NpcPosition struct { ID int `db:"id"` NPCID int `db:"npc_id"` MapID int16 `db:"map"` Rotation float64 `db:"rotation"` MinLocation string `db:"min_location"` MaxLocation string `db:"max_location"` Count int16 `db:"count"` RespawnTime int `db:"respawn_time"` IsNPC bool `db:"is_npc"` Attackable bool `db:"attackable"` PseudoID uint16 `db:"-"` }
func FindNPCPosByID ¶
func FindNPCPosByID(id int) (*NpcPosition, error)
func FindNPCPosInMap ¶
func FindNPCPosInMap(mapID int16) ([]*NpcPosition, error)
func GetAllNPCPos ¶
func GetAllNPCPos() ([]*NpcPosition, error)
func (*NpcPosition) Create ¶
func (e *NpcPosition) Create() error
func (*NpcPosition) CreateWithTransaction ¶
func (e *NpcPosition) CreateWithTransaction(tr *gorp.Transaction) error
func (*NpcPosition) Delete ¶
func (e *NpcPosition) Delete() error
func (*NpcPosition) SetLocations ¶
func (e *NpcPosition) SetLocations(min, max *utils.Location)
func (*NpcPosition) Update ¶
func (e *NpcPosition) Update() error
type Party ¶
type Party struct { Leader *Character Members map[int]*PartyMember // contains filtered or unexported fields }
func (*Party) AddMember ¶
func (p *Party) AddMember(m *PartyMember)
func (*Party) GetMember ¶
func (p *Party) GetMember(id int) *PartyMember
func (*Party) GetMembers ¶
func (p *Party) GetMembers() []*PartyMember
func (*Party) RemoveMember ¶
func (p *Party) RemoveMember(m *PartyMember)
func (*Party) WelcomeMember ¶
type PartyMember ¶
type Pet ¶
type Pet struct { ID int64 `db:"id"` Name string `db:"name"` Evolution int16 `db:"evolution"` Level int16 `db:"level"` TargetLevel int16 `db:"target_level"` EvolvedID int64 `db:"evolved_id"` BaseSTR int `db:"base_str"` AdditionalSTR int `db:"additional_str"` BaseDEX int `db:"base_dex"` AdditionalDEX int `db:"additional_dex"` BaseINT int `db:"base_int"` AdditionalINT int `db:"additional_int"` BaseHP int `db:"base_hp"` AdditionalHP int `db:"additional_hp"` BaseChi int `db:"base_chi"` AdditionalChi int `db:"additional_chi"` SkillID int `db:"skill_id"` Combat bool `db:"combat"` }
func (*Pet) CreateWithTransaction ¶
func (e *Pet) CreateWithTransaction(tr *gorp.Transaction) error
type PetExpInfo ¶
type PetExpInfo struct { Level int16 `db:"level"` ReqExpEvo1 int `db:"req_exp_evo1"` ReqExpEvo2 int `db:"req_exp_evo2"` ReqExpEvo3 int `db:"req_exp_evo3"` ReqExpHt int `db:"req_exp_ht"` ReqExpDivEvo1 int `db:"req_exp_div_evo1"` ReqExpDivEvo2 int `db:"req_exp_div_evo2"` ReqExpDivEvo3 int `db:"req_exp_div_evo3"` }
func (*PetExpInfo) Create ¶
func (p *PetExpInfo) Create() error
func (*PetExpInfo) CreateWithTransaction ¶
func (p *PetExpInfo) CreateWithTransaction(tr *gorp.Transaction) error
func (*PetExpInfo) Delete ¶
func (p *PetExpInfo) Delete() error
func (*PetExpInfo) Update ¶
func (p *PetExpInfo) Update() error
type PetSlot ¶
type PetSlot struct { Name string `db:"name" json:"name"` Level byte `db:"level" json:"level"` Loyalty byte `db:"loyalty" json:"loyalty"` Fullness byte `db:"fullness" json:"fullness"` HP int `db:"hp" json:"hp"` MaxHP int `db:"max_hp" json:"max_hp"` CHI int `db:"chi" json:"chi"` MaxCHI int `db:"max_chi" json:"max_chi"` Exp uint64 `db:"exp" json:"exp"` STR int `db:"str" json:"str"` DEX int `db:"dex" json:"dex"` INT int `db:"int" json:"int"` MinATK int `db:"min_atk" json:"min_atk"` MaxATK int `db:"max_atk" json:"max_atk"` DEF int `db:"def" json:"def"` ArtsDEF int `db:"arts_def" json:"arts_def"` Casting bool `db:"-" json:"-"` Coordinate utils.Location `db:"-" json:"-"` IsOnline bool `db:"-" json:"-"` IsMoving bool `db:"-" json:"-"` LastHit int `db:"-" json:"-"` MovementToken int64 `db:"-" json:"-"` PseudoID int `db:"-" json:"-"` RefreshStats bool `db:"-" json:"-"` Target int `db:"-" json:"-"` TargetLocation utils.Location `db:"-" json:"-"` }
func (*PetSlot) FindTargetMobID ¶
type PlayerTarget ¶
type Production ¶
type Production struct { ID int `db:"id"` Materials []byte `db:"materials"` Probability int `db:"probability"` Cost int64 `db:"cost"` Production int `db:"production"` // contains filtered or unexported fields }
func (*Production) Create ¶
func (e *Production) Create() error
func (*Production) CreateWithTransaction ¶
func (e *Production) CreateWithTransaction(tr *gorp.Transaction) error
func (*Production) Delete ¶
func (e *Production) Delete() error
func (*Production) GetMaterials ¶
func (e *Production) GetMaterials() ([]*ProductionMaterial, error)
type ProductionMaterial ¶
type Relic ¶
type Relic struct { ID int `db:"id"` Count int `db:"count"` Limit int `db:"limit"` Tradable bool `db:"tradable"` RequiredItems string `db:"required_items"` }
func (*Relic) CreateWithTransaction ¶
func (e *Relic) CreateWithTransaction(tr *gorp.Transaction) error
type SavePoint ¶
func (*SavePoint) CreateWithTransaction ¶
func (e *SavePoint) CreateWithTransaction(tr *gorp.Transaction) error
type Server ¶
type Server struct { ID int `db:"id" json:"id"` Name string `db:"name" json:"name"` MaxUsers int `db:"max_users" json:"max_users"` }
func (*Server) CreateWithTransaction ¶
func (t *Server) CreateWithTransaction(tr *gorp.Transaction) error
type ServerItem ¶
func GetServerByID ¶
func GetServerByID(id string) (*ServerItem, error)
func GetServers ¶
func GetServers() ([]*ServerItem, error)
type Shop ¶
func (*Shop) IsPurchasable ¶
type SkillInfo ¶
type SkillInfo struct { ID int `db:"id"` BookID int64 `db:"book_id"` Name string `db:"name"` Target int8 `db:"target"` PassiveType uint8 `db:"passive_type"` Type uint8 `db:"type"` MaxPlus int8 `db:"max_plus"` Slot int `db:"slot"` BaseTime int `db:"base_duration"` AdditionalTime int `db:"additional_duration"` CastTime float64 `db:"cast_time"` BaseChi int `db:"base_chi"` AdditionalChi int `db:"additional_chi"` BaseMinMultiplier int `db:"base_min_multiplier"` AdditionalMinMultiplier int `db:"additional_min_multiplier"` BaseMaxMultiplier int `db:"base_max_multiplier"` AdditionalMaxMultiplier int `db:"additional_max_multiplier"` BaseRadius float64 `db:"base_radius"` AdditionalRadius float64 `db:"additional_radius"` Passive bool `db:"passive"` BasePassive int `db:"base_passive"` AdditionalPassive int `db:"additional_passive"` InfectionID int `db:"infection_id"` AreaCenter int `db:"area_center"` Cooldown float64 `db:"cooldown"` }
func (*SkillInfo) CreateWithTransaction ¶
func (e *SkillInfo) CreateWithTransaction(tr *gorp.Transaction) error
type SkillSet ¶
type SkillSet struct { BookID int64 `json:"book"` Skills []*SkillTuple `json:"skills"` }
type SkillSlots ¶
type SkillSlots struct {
Slots []*SkillSet `json:"slots"`
}
type SkillTuple ¶
type Skills ¶
type Skills struct { ID int `db:"id" json:"id"` SkillPoints int `db:"skill_points" json:"skill_points"` Skills json.RawMessage `db:"skills" json:"skill"` }
func FindSkillsByID ¶
func (*Skills) CreateWithTransaction ¶
func (e *Skills) CreateWithTransaction(tr *gorp.Transaction) error
func (*Skills) GetSkills ¶
func (e *Skills) GetSkills() (*SkillSlots, error)
func (*Skills) GetSkillsData ¶
func (*Skills) SetSkills ¶
func (e *Skills) SetSkills(slots *SkillSlots) error
type Socket ¶
type Socket struct { Conn net.Conn ClientAddr string User *User Character *Character Stats *Stat Skills *Skills HoustonSub *nats.Subscription // contains filtered or unexported fields }
func (*Socket) ParseHeader ¶
func (*Socket) SetPingDuration ¶
func (*Socket) SetPingHandler ¶
type Stackable ¶
func FindStackableByUIF ¶
func (*Stackable) CreateWithTransaction ¶
func (e *Stackable) CreateWithTransaction(tr *gorp.Transaction) error
type Stat ¶
type Stat struct { ID int `db:"id"` HP int `db:"hp"` MaxHP int `db:"max_hp"` HPRecoveryRate int `db:"hp_recovery_rate"` CHI int `db:"chi"` MaxCHI int `db:"max_chi"` CHIRecoveryRate int `db:"chi_recovery_rate"` STR int `db:"str"` DEX int `db:"dex"` INT int `db:"int"` STRBuff int `db:"str_buff"` DEXBuff int `db:"dex_buff"` INTBuff int `db:"int_buff"` StatPoints int `db:"stat_points"` Honor int `db:"honor"` MinATK int `db:"min_atk"` MaxATK int `db:"max_atk"` ATKRate int `db:"atk_rate"` MinArtsATK int `db:"min_arts_atk"` MaxArtsATK int `db:"max_arts_atk"` ArtsATKRate int `db:"arts_atk_rate"` DEF int `db:"def"` DefRate int `db:"def_rate"` ArtsDEF int `db:"arts_def"` ArtsDEFRate int `db:"arts_def_rate"` Accuracy int `db:"accuracy"` Dodge int `db:"dodge"` PoisonATK int `db:"poison_atk"` ParalysisATK int `db:"paralysis_atk"` ConfusionATK int `db:"confusion_atk"` PoisonDEF int `db:"poison_def"` ParalysisDEF int `db:"paralysis_def"` ConfusionDEF int `db:"confusion_def"` Wind int `db:"wind"` WindBuff int `db:"wind_buff"` Water int `db:"water"` WaterBuff int `db:"water_buff"` Fire int `db:"fire"` FireBuff int `db:"fire_buff"` }
func FindStatByID ¶
func (*Stat) CreateWithTransaction ¶
func (t *Stat) CreateWithTransaction(tr *gorp.Transaction) error
type User ¶
type User struct { ID string `db:"id" json:"ID"` Username string `db:"user_name" json:"Username"` Password string `db:"password" json:"Password"` UserType int8 `db:"user_type" json:"UserType"` ConnectedIP string `db:"ip" json:"ConnectedIP"` ConnectedServer int `db:"server" json:"ConnectedServer"` NCash uint64 `db:"ncash" json:"NCash"` BankGold uint64 `db:"bank_gold" json:"BankGold"` Mail string `db:"mail" json:"Mail"` CreatedAt null.Time `db:"created_at" json:"createdAt"` DisabledUntil null.Time `db:"disabled_until" json:"disabledUntil"` ConnectingIP string `db:"-"` ConnectingTo int `db:"-"` // contains filtered or unexported fields }
func FindUserByID ¶
func FindUserByIP ¶
func FindUserByMail ¶
func FindUserByName ¶
func FindUsersInServer ¶
func (*User) CreateWithTransaction ¶
func (u *User) CreateWithTransaction(tr *gorp.Transaction) error
Source Files
¶
- advanced_fusion.go
- ai.go
- buff_icons.go
- buff_infections.go
- characters.go
- characters_buffs.go
- consignment.go
- drop.go
- drops_info.go
- duel.go
- exps.go
- gambling.go
- gates.go
- guilds.go
- hax_codes.go
- ht_items.go
- init.go
- inventory.go
- items.go
- job_passives.go
- maps.go
- melting.go
- ncp_scripts.go
- npc_pos.go
- npcs.go
- party.go
- pet_exps.go
- pets.go
- productions.go
- relics.go
- sales.go
- save_points.go
- servers.go
- shop_items.go
- shop_table.go
- skill.go
- skills.go
- socket.go
- stackables.go
- stats.go
- trade.go
- users.go
Click to show internal directories.
Click to hide internal directories.