From The Mana World
(rework structure of new Net)
(Add all(?) packets we send to eAthena)
Line 15: Line 15:
*NewChar(...)
*NewChar(...)
*DeleteChar(number, ...)
*DeleteChar(number, ...)
*Who


Chat
Chat
Line 20: Line 21:
*Me(text)
*Me(text)
*Msg(recipient, text)
*Msg(recipient, text)
Map
*MapLoaded(mapName?)
*ClientPing(time)


Being
Being
*Attack(beingId)
*Attack(beingId)
*Player
*CharNameRequest - eAthena netcode detail (not public)
*LocalPlayer
 
Player
*(anything?)
 
LocalPlayer
*Emote(emoteId)
*Emote(emoteId)
*IncStat(statId)
*IncStat(statId)
*DecStat(statId)
*DecStat(statId)
*SendLetter(recipient, text)
*SendLetter(recipient, text)
*PickUp(floorItemId)
*SetDestination(x, y, direction)
*Sit
*Respawn


Inventory
Inventory
*Equip(slotNum)
*EquipItem(Item)
*UnEquipItem(Item)
*UseItem(Item)
*Drop(slotNum, ammount)
*Drop(slotNum, ammount)
*Split(slotNum, ammount)
*Split(slotNum, ammount)
Line 60: Line 75:
*RemoveItem(slotNum, ammount)
*RemoveItem(slotNum, ammount)
*SetMoney(ammount)
*SetMoney(ammount)
*Confirm()
*Confirm() (eAthena trade complete)
*Finish()
*Finish() (eAthena trade OK)
*Cancel()
*Cancel()


Line 67: Line 82:
*Create()
*Create()
*Join(partyId)
*Join(partyId)
*Invite(playerId)
*InviteResponse(requestId?, response)
*Leave()
*Leave()
*Kick(playerId)
*Kick(playerId)
*Chat(text)
*Chat(text)
*Settings?


Guild
Guild
*Create()
*Create()
*Join(guildId)
*Join(guildId)
*Invite(playerId)
*InviteResponse(requestId?, response)
*Leave()
*Kick(playerId)
*Chat(text)
*Chat(text)



Revision as of 17:01, 24 March 2009

This is my plan for centralizing the net code under the merged client.

First, TMWServ's Net namespace needs to be changed (I vote for TMWserv as the new name). Then a new Net namespace would be created to store references to the specific network back-end needed.

Here are the functions the generic back end needs (organized by type)

Login

  • Login(...)
  • ChangeEmail(...)
  • ChangePassword(...)
  • ChooseServer(serverId)

Char

  • ChooseChar(number)
  • NewChar(...)
  • DeleteChar(number, ...)
  • Who

Chat

  • Talk(text)
  • Me(text)
  • Msg(recipient, text)

Map

  • MapLoaded(mapName?)
  • ClientPing(time)

Being

  • Attack(beingId)
  • CharNameRequest - eAthena netcode detail (not public)

Player

  • (anything?)

LocalPlayer

  • Emote(emoteId)
  • IncStat(statId)
  • DecStat(statId)
  • SendLetter(recipient, text)
  • PickUp(floorItemId)
  • SetDestination(x, y, direction)
  • Sit
  • Respawn

Inventory

  • EquipItem(Item)
  • UnEquipItem(Item)
  • UseItem(Item)
  • Drop(slotNum, ammount)
  • Split(slotNum, ammount)

NPC

  • Talk(npcId)
  • NextDialog(npcId)
  • CloseDialog(npcId)
  • ListInput(npcId, value)
  • IntegerInput(npcId, value)
  • StringIntput(npcId, value)

Shop

  • Start(beingId)
  • Buy(beingId)
  • Sell(beingId)
  • BuyItem(beingId, itemId, ammount)
  • SellItem(beingId, itemId, ammount)
  • End(beingId)

Skill

  • Up(skillId)
  • Use(skillId)

Trade

  • Request(beingId)
  • AddItem(slotNum, ammount)
  • RemoveItem(slotNum, ammount)
  • SetMoney(ammount)
  • Confirm() (eAthena trade complete)
  • Finish() (eAthena trade OK)
  • Cancel()

Party

  • Create()
  • Join(partyId)
  • Invite(playerId)
  • InviteResponse(requestId?, response)
  • Leave()
  • Kick(playerId)
  • Chat(text)
  • Settings?

Guild

  • Create()
  • Join(guildId)
  • Invite(playerId)
  • InviteResponse(requestId?, response)
  • Leave()
  • Kick(playerId)
  • Chat(text)

Storage

  • Open()
  • Close()
  • Store(slotId, ammount)
  • Retrieve(slotId, ammount)

Admin/GM

  • Announce(text)
  • Kick(id)
  • Kick(name)
  • Ban(id)
  • Ban(name)
  • ...