From The Mana World
(rework structure of new Net)
m (Increase/DecreaseStat -> Increase/DecreaseAttribute)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is my plan for centralizing the net code under the merged client.
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.
A new Net namespace with functions for returning the handlers described below.


Here are the functions the generic back end needs (organized by type)
ex: to use emote 1:
Net::getPlayerHandler()->emote(1);
 
General
*Load
*GuiWindowsLoaded (tells the netstack when it can start adding the hooks it needs in the GUI, like adding eAthena's party chat tab or changing the contents of the menu bar)
*Unload


Login
Login
*Login(...)
*Login(username, password)
*ChangeEmail(...)
*Logout() (TMWServ protocol detail?)
*ChangePassword(...)
*ChangeEmail(email)
*ChangePassword(username, oldPassword, newPassword)
*ChooseServer(serverId)
*ChooseServer(serverId)
*Register(username, password, email)
*Unregister(username, password)


Char
Char
*Connect() (eAthena protocol detail)
*ChooseChar(number)
*ChooseChar(number)
*NewChar(...)
*NewChar(name, gender, hairstyle, hair color) (more info can be done by calling the needed dialog and having it call a back end specific function)
*DeleteChar(number, ...)
*DeleteChar(number) (conformation, which is technically needed by eAthena, can be done here using a dialog that calls a back end specific function)


Chat
Chat
*Connect() (TMWServ protocol detail)
*Logout() (TMWServ protocol detail)
*Talk(text)
*Talk(text)
*Me(text)
*Me(text)
*Msg(recipient, text)
*PrivateMsg(recipient, text)
*ChannelList()
*EnterChannel(channelId, password)
*QuitChannel(channelId)
*SendToChannel(channelId, text)
*UserList(channelName)
*SetChannelTopic(channelId, text)
*SetUserMode(channelId, name, mode)
*KickUser(channelId, name)
 
Map
*Connect()
*MapLoaded() (eAthena protocol detail?)
*ClientPing(time) (eAthena protocol detail?)
*CharNameRequest(beingId) (eAthena protocol detail)
*Who()
*Quit()


Being
Player
*Attack(beingId)
*Attack(being)
*Player
*LocalPlayer
*Emote(emoteId)
*Emote(emoteId)
*IncStat(statId)
*IncreaseAttribute(statId)
*DecStat(statId)
*IncreaseAttribute(statId)
*SendLetter(recipient, text)
*IncreaseSkill(skillId)
*PickUp(floorItem)
*SetDirection(direction)
*SetDestination(x, y, direction)
*Sit()
*Respawn()
*IgnorePlayer(player, ignore)
*IgnoreAll(ignore)


Inventory
Inventory
*Equip(slotNum)
*EquipItem(Item)
*Drop(slotNum, ammount)
*UnEquipItem(Item)
*Split(slotNum, ammount)
*UseItem(slotNum, Item)
*Drop(slotNum, amount)
*Split(slotNum, amount)
*OpenStorage()
*CloseStorage()
*ChangeCart(...)
*MoveItem(source, slotId, amount, destination) (handles item movement between inventory, storage, cart, ...)


NPC
NPC
Line 42: Line 81:
*IntegerInput(npcId, value)
*IntegerInput(npcId, value)
*StringIntput(npcId, value)
*StringIntput(npcId, value)
 
*SendLetter(npcId, recipient, text)
Shop
*StartShoping(beingId)
*Start(beingId)
*Buy(beingId)
*Buy(beingId)
*Sell(beingId)
*Sell(beingId)
*BuyItem(beingId, itemId, ammount)
*BuyItem(beingId, itemId, ammount)
*SellItem(beingId, itemId, ammount)
*SellItem(beingId, itemId, ammount)
*End(beingId)
*EndShoping(beingId)


Skill
Special
*Up(skillId)
*Use(id)
*Use(skillId)
*Use(id, level, target)
*Use(id, level, x, y)
*Use(id, map)


Trade
Trade
*Request(beingId)
*Request(beingId)
*Respond(accept)
*AddItem(slotNum, ammount)
*AddItem(slotNum, ammount)
*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 108:
*Create()
*Create()
*Join(partyId)
*Join(partyId)
*Invite(playerId)
*InviteResponse(requestId?, response)
*Leave()
*Leave()
*Kick(playerId)
*Kick(playerId)
*Chat(text)
*Chat(text)
*PartyMembers()
*Options(...)
*Message(...)


Guild
Guild
*Create()
*Create()
*Join(guildId)
*Join(guildId)
*Invite(playerId)
*InviteResponse(requestId?, response)
*Leave()
*Kick(playerId)
*Chat(text)
*Chat(text)
 
*MemberList(guildId)
Storage
*ChangeMemberPosition(guildId, ...)
*Open()
*RequestAlliance(guildid, ...)
*Close()
*RequestAllianceReply(guildId, response, ...)
*Store(slotId, ammount)
*EndAlliance(guildid, ...)
*Retrieve(slotId, ammount)


Admin/GM
Admin/GM
*Announce(text)
*Announce(text)
*LocalAnnounce(text)
*Hide(hide)
*Kick(id)
*Kick(id)
*Kick(name)
*Kick(name)
*Ban(id)
*Ban(id)
*Ban(name)
*Ban(name)
*MutePlayer(playerId, type, limit)
*ResetPlayer(...)
*WarpToPlayer(...)
*RecallPlayer(...)
*SpawnMonster(...)
*CreateItem(...)
*...
*...
*GMCommand(...)?
Unsorted eAthena (names from parse function names)
*RemoveOption
*GuildCheckMaster
*GuildRequestInfo
*GuildRequestEmblem
*GuildChangeEmplem
*GuildBreak
*GuildChangePositionInfo
*GuildChangeNotice
*ItemIdentify
*UseCard
*InsertCard
*GuildOpposition
*SolveCharName
*AutoSpell
*GMReqNoChatCount
*sn_doridori
*CreateParty2 (same as CreateParty in our eAthena)
*sn_explosionspirits

Latest revision as of 19:51, 14 July 2009

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

A new Net namespace with functions for returning the handlers described below.

ex: to use emote 1:

Net::getPlayerHandler()->emote(1);

General

  • Load
  • GuiWindowsLoaded (tells the netstack when it can start adding the hooks it needs in the GUI, like adding eAthena's party chat tab or changing the contents of the menu bar)
  • Unload

Login

  • Login(username, password)
  • Logout() (TMWServ protocol detail?)
  • ChangeEmail(email)
  • ChangePassword(username, oldPassword, newPassword)
  • ChooseServer(serverId)
  • Register(username, password, email)
  • Unregister(username, password)

Char

  • Connect() (eAthena protocol detail)
  • ChooseChar(number)
  • NewChar(name, gender, hairstyle, hair color) (more info can be done by calling the needed dialog and having it call a back end specific function)
  • DeleteChar(number) (conformation, which is technically needed by eAthena, can be done here using a dialog that calls a back end specific function)

Chat

  • Connect() (TMWServ protocol detail)
  • Logout() (TMWServ protocol detail)
  • Talk(text)
  • Me(text)
  • PrivateMsg(recipient, text)
  • ChannelList()
  • EnterChannel(channelId, password)
  • QuitChannel(channelId)
  • SendToChannel(channelId, text)
  • UserList(channelName)
  • SetChannelTopic(channelId, text)
  • SetUserMode(channelId, name, mode)
  • KickUser(channelId, name)

Map

  • Connect()
  • MapLoaded() (eAthena protocol detail?)
  • ClientPing(time) (eAthena protocol detail?)
  • CharNameRequest(beingId) (eAthena protocol detail)
  • Who()
  • Quit()

Player

  • Attack(being)
  • Emote(emoteId)
  • IncreaseAttribute(statId)
  • IncreaseAttribute(statId)
  • IncreaseSkill(skillId)
  • PickUp(floorItem)
  • SetDirection(direction)
  • SetDestination(x, y, direction)
  • Sit()
  • Respawn()
  • IgnorePlayer(player, ignore)
  • IgnoreAll(ignore)

Inventory

  • EquipItem(Item)
  • UnEquipItem(Item)
  • UseItem(slotNum, Item)
  • Drop(slotNum, amount)
  • Split(slotNum, amount)
  • OpenStorage()
  • CloseStorage()
  • ChangeCart(...)
  • MoveItem(source, slotId, amount, destination) (handles item movement between inventory, storage, cart, ...)

NPC

  • Talk(npcId)
  • NextDialog(npcId)
  • CloseDialog(npcId)
  • ListInput(npcId, value)
  • IntegerInput(npcId, value)
  • StringIntput(npcId, value)
  • SendLetter(npcId, recipient, text)
  • StartShoping(beingId)
  • Buy(beingId)
  • Sell(beingId)
  • BuyItem(beingId, itemId, ammount)
  • SellItem(beingId, itemId, ammount)
  • EndShoping(beingId)

Special

  • Use(id)
  • Use(id, level, target)
  • Use(id, level, x, y)
  • Use(id, map)

Trade

  • Request(beingId)
  • Respond(accept)
  • 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)
  • PartyMembers()
  • Options(...)
  • Message(...)

Guild

  • Create()
  • Join(guildId)
  • Invite(playerId)
  • InviteResponse(requestId?, response)
  • Leave()
  • Kick(playerId)
  • Chat(text)
  • MemberList(guildId)
  • ChangeMemberPosition(guildId, ...)
  • RequestAlliance(guildid, ...)
  • RequestAllianceReply(guildId, response, ...)
  • EndAlliance(guildid, ...)

Admin/GM

  • Announce(text)
  • LocalAnnounce(text)
  • Hide(hide)
  • Kick(id)
  • Kick(name)
  • Ban(id)
  • Ban(name)
  • MutePlayer(playerId, type, limit)
  • ResetPlayer(...)
  • WarpToPlayer(...)
  • RecallPlayer(...)
  • SpawnMonster(...)
  • CreateItem(...)
  • ...
  • GMCommand(...)?

Unsorted eAthena (names from parse function names)

  • RemoveOption
  • GuildCheckMaster
  • GuildRequestInfo
  • GuildRequestEmblem
  • GuildChangeEmplem
  • GuildBreak
  • GuildChangePositionInfo
  • GuildChangeNotice
  • ItemIdentify
  • UseCard
  • InsertCard
  • GuildOpposition
  • SolveCharName
  • AutoSpell
  • GMReqNoChatCount
  • sn_doridori
  • CreateParty2 (same as CreateParty in our eAthena)
  • sn_explosionspirits