User:Gshlvr/Guild: Difference between revisions
From The Mana World
Page for notes on the guild system |
No edit summary |
||
| Line 1: | Line 1: | ||
This is how the guild system worked before it was removed from tmwa. | This is how the guild system worked before it was removed from tmwa. | ||
== Server handling of guild packets from client == | |||
=== 0x0165 CMSG_GUILD_CREATE === | |||
(map) clif_parse_CreateGuild // map/clif.cpp | (map) clif_parse_CreateGuild // map/clif.cpp | ||
guild_create // map/guild.cpp | guild_create // map/guild.cpp | ||
| Line 34: | Line 35: | ||
(client) | (client) | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
=== 0x0168 CMSG_GUILD_INVITE === | |||
(map) clif_parse_GuildInvite // map/clif.cpp | (map) clif_parse_GuildInvite // map/clif.cpp | ||
guild_invite // map/guild.cpp | guild_invite // map/guild.cpp | ||
| Line 42: | Line 43: | ||
(client) | (client) | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
=== 0x016b CMSG_GUILD_INVITE_REPLY === | |||
clif_parse_GuildInviteReply // map/clif.cpp | clif_parse_GuildInviteReply // map/clif.cpp | ||
| Line 80: | Line 81: | ||
clif_guild_notice ------ 0x016f // map/clif.cpp | clif_guild_notice ------ 0x016f // map/clif.cpp | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
== Client handling of guild packets from tmwa == | |||
=== 0x0167 SMSG_GUILD_CREATE_RESPONSE === | |||
processGuildCreateResponse | |||
notify(GUILD_CREATED)[0] | |||
notify(GUILD_ALREADY)[1] | |||
notify(GUILD_ALREADY)[2] | |||
notify(GUILD_EMPERIUM_CHECK_FAILED)[3] | |||
notify(GUILD_ERROR)[default] | |||
-------------------------------------------------------------------------------- | |||
=== 0x016c SMSG_GUILD_POSITION_INFO === | |||
processGuildPositionInfo | |||
setGuildPositionFlags(Invite) | |||
getGuild(guildID) | |||
if not guild, return | |||
setName(guildName) | |||
setEmblemId(emblem) | |||
{open guild tab} | |||
{if local player} | |||
set guild and guild name | |||
-------------------------------------------------------------------------------- | |||
=== 0x016d SMSG_GUILD_MEMBER_LOGIN === | |||
processGuildMemberLogin | |||
{if they're in our guild} | |||
guildTab->showOnline(guildmember, online) | |||
socialWindow->updateGuildCounter() | |||
-------------------------------------------------------------------------------- | |||
=== 0x014e SMSG_GUILD_MASTER_OR_MEMBER === | |||
unimplemented? | |||
processguildMasterOrMember // net/ea/guildhandler.cpp | |||
msg.readInt32("type") | |||
{0x57 for member, 0xd7 for master} | |||
-------------------------------------------------------------------------------- | |||
=== 0x01b6 SMSG_GUILD_BASIC_INFO === | |||
processGuildBasicInfo // net/ea/guildhandler.cpp | |||
{if guildTab && showBasicInfo} | |||
print a bunch of stuff to guild chat | |||
{get new or existing guild} | |||
g->setName | |||
g->setEmblemId | |||
-------------------------------------------------------------------------------- | |||
=== 0x014c SMSG_GUILD_ALIANCE_INFO === | |||
unimplemented? | |||
processGuildAllianceInfo // net/ea/guildhandler.cpp | |||
{if msg length < 4 } | |||
return | |||
msg.readInt32("opposition") | |||
msg.readInt32("guild id") | |||
msg.raedString(24, "guild name") | |||
-------------------------------------------------------------------------------- | |||
=== 0x0154 SMSG_GUILD_MEMBER_LIST === | |||
hair and hair color are skipped as well as the 50 bytes at the end of the packet | |||
processGuildMemberList // net/ea/guildhandler.cpp | |||
{if msg len < 4 } | |||
return | |||
{ if !taGuild } | |||
return | |||
taGuild->clearMembers() | |||
{create a guild member and add to taGuild} | |||
{ if guild member } | |||
setOnline(online) | |||
setID(id) | |||
setCharId(charId) | |||
setGender(intToGender(gender)) | |||
setLevel(level) | |||
setExp(exp) | |||
setPos(pos) | |||
setRace(race) | |||
{ if player can be found and their level != 'level' } | |||
being->setLevel(level) | |||
being->updateName() | |||
increment onlineNum | |||
increment totalNum | |||
taGuild->sort() | |||
{ if actorManager } | |||
updatePlayerGuild() | |||
updatePlayerColors() | |||
{ if socialWindow } | |||
updateGuildCounter(onlineNum, totalNum) | |||
-------------------------------------------------------------------------------- | |||
=== 0x0166 SMSG_GUILD_POS_NAME_LIST === | |||
processGuildPosNameList // net/ea/guildhandler.cpp | |||
{ if !taGuild } | |||
return | |||
{ if msg len < 4 } | |||
return | |||
taGuild->addPos(id, name) | |||
-------------------------------------------------------------------------------- | |||
=== 0x0160 SMSG_GUILD_POS_INFO_LIST === | |||
unimplemented? | |||
processGuildPosInfoList // net/ea/guildhandler.cpp | |||
{ if msg len < 4 } | |||
return | |||
msg.readInt32("id") | |||
msg.readInt32("mode") | |||
msg.readInt32("same id") | |||
msg.readInt32("exp mode") | |||
-------------------------------------------------------------------------------- | |||
=== 0x0174 SMSG_GUILD_POSITION_CHANGED === | |||
unimplemented? | |||
processGuildPositionChanged // net/ea/guildhandler.cpp | |||
msg.readInt16("len") | |||
msg.readInt32("id") | |||
msg.readInt32("mode") | |||
msg.readInt32("same ip") | |||
msg.readInt32("exp mode") | |||
msg.readString(24, "name") | |||
-------------------------------------------------------------------------------- | |||
=== 0x0156 SMSG_GUILD_MEMBER_POS_CHANGE === | |||
unimplemented? | |||
message length is skipped | |||
processGuildPositionChanged // net/ea/guildhandler.cpp | |||
{ if guild member(accountId, charId) exists } | |||
setPos(pos) | |||
-------------------------------------------------------------------------------- | |||
=== 0x0152 SMSG_GUILD_EMBLEM_DATA === | |||
unimplemented? | |||
processGuildEmblemData // net/ea/guildhandler.cpp | |||
length = "len" | |||
msg.readInt32("guild id") | |||
msg.readint32("emblem id") | |||
{ if length < 12 } | |||
return | |||
msg.skip(length - 12, "emblem data") | |||
-------------------------------------------------------------------------------- | |||
=== 0x0162 SMSG_GUILD_SKILL_INFO === | |||
skill points is unused | |||
processGuildSkillInfo // net/ea/guildhandler.cpp | |||
count = "len" - 6 / 37 | |||
{ if skillDialog } | |||
hideSkills(SkillOwner::Guild) | |||
{ try updating the skill } | |||
{ if that failed, add the skill } | |||
{ if skillDialog } | |||
skillDialog->updateModels() | |||
-------------------------------------------------------------------------------- | |||
=== 0x016f SMSG_GUILD_NOTICE === | |||
processGuildNotice // net/ea/guildhandler.cpp | |||
msg1 = "msg1" | |||
msg2 = "msg2" | |||
{ if guildTab } | |||
chatLog(msg1, BY_SERVER) | |||
chatLog(msg2, BY_SERVER) | |||
-------------------------------------------------------------------------------- | |||
=== 0x016a SMSG_GUILD_INVITE === | |||
processGuildInvite // net/ea/guildhandler.cpp | |||
guildId = "guild id" | |||
guildName = "guild name" | |||
{ if socialWindow } | |||
showGuildInvite(guildName, guildId, "") | |||
-------------------------------------------------------------------------------- | |||
=== 0x0169 SMSG_GUILD_INVITE_ACK === | |||
processGuildInviteAck // net/ea/guildhandler.cpp | |||
notify(GUILD_INVITE_FAILED) [0] | |||
notify(GUILD_INVITE_REJECTED) [1] | |||
notify(GUILD_INVITE_JOINED) [2] | |||
notify(GUILD_INVITE_FULL) [3] | |||
notify(GUILD_INVITE_ERROR) [default] | |||
-------------------------------------------------------------------------------- | |||
=== 0x015a SMSG_GUILD_LEAVE === | |||
-------------------------------------------------------------------------------- | |||
=== 0x015c SMSG_GUILD_EXPULSION === | |||
-------------------------------------------------------------------------------- | |||
=== 0x0163 SMSG_GUILD_EXPULSION_LIST === | |||
-------------------------------------------------------------------------------- | |||
=== 0x017f SMSG_GUILD_MESSAGE === | |||
-------------------------------------------------------------------------------- | |||
=== 0x010e SMSG_GUILD_SKILL_UP === | |||
unimplemented? | |||
processGuildSkillUp // net/ea/guildhandler.cpp | |||
msg.readInt16("skill id") | |||
msg.readInt16("level") | |||
msg.readInt16("sp") | |||
msg.readInt16("range") | |||
msg.readUInt8("unused?") | |||
-------------------------------------------------------------------------------- | |||
=== 0x0171 SMSG_GUILD_REQ_ALLIANCE === | |||
Implementation not planned at this time | |||
-------------------------------------------------------------------------------- | |||
=== 0x0173 SMSG_GUILD_REQ_ALLIANCE_ACK === | |||
Implementation not planned at this time | |||
-------------------------------------------------------------------------------- | |||
=== 0x0184 SMSG_GUILD_DEL_ALLIANCE === | |||
Implementation not planned at this time | |||
-------------------------------------------------------------------------------- | |||
=== 0x0181 SMSG_GUILD_OPPOSITION_ACK === | |||
Implementation not planned at this time | |||
-------------------------------------------------------------------------------- | |||
=== 0x015e SMSG_GUILD_BROKEN === | |||
unimplemented? | |||
-------------------------------------------------------------------------------- | |||
processGuildBroken | |||
msg.readInt32("flag") | |||
Latest revision as of 01:43, 7 May 2015
This is how the guild system worked before it was removed from tmwa.
Server handling of guild packets from client[edit]
0x0165 CMSG_GUILD_CREATE[edit]
(map) clif_parse_CreateGuild // map/clif.cpp
guild_create // map/guild.cpp
guild_makemember // map/guild.cpp
intif_guild_create -- 0x3030 // map/intif.cpp
(char) mapif_parse_CreateGuild // char/int_guild.cpp
mapif_guild_created -- 0x3830 // char/int_guild.cpp
(map) intif_parse_GuildCreated // map/intif.cpp
guild_created // map/guild.cpp
clif_guild_created -- 0x167 (client) // map/clif.cpp
(char) mapif_guild_info -- 0x3831
(map) intif_parse_GuildInfo // map/intif.cpp
guild_recv_noinfo // map/guild.cpp
None -- set guild_id to 0
guild_recv_info // map/guild.cpp
clif_guild_basicinfo -- 0x01b6 // map/clif.cpp
(client)
clif_guild_emblem -- 0x0152 // map/clif.cpp
(client)
clif_guild_memberlist -- 0x0154 // map/clif.cpp
(client)
clif_guild_skillinfo -- 0x0162 // map/clif.cpp
(client)
clif_guild_belonginfo -- 0x016c // map/clif.cpp
(client)
clif_guild_notice -- 0x016f // map/clif.cpp
(client)
0x0168 CMSG_GUILD_INVITE[edit]
(map) clif_parse_GuildInvite // map/clif.cpp
guild_invite // map/guild.cpp
clif_guild_inviteack -- 0x0169 // map/clif.cpp
(client)
clif_guild_invite -- 0x016a // map/clif.cpp
(client)
0x016b CMSG_GUILD_INVITE_REPLY[edit]
clif_parse_GuildInviteReply // map/clif.cpp
guild_reply_invite // map/guild.cpp
clif_guild_inviteack --- 0x0169 // map/clif.cpp
guild_makemember // map/guild.cpp
intif_guild_addmember -- 0x3032 // map/intif.cpp
mapif_parse_GuildAddMember // char/int_guild.cpp
guild_calcinfo // char/int_guild.cpp
mapif_guild_memberadded -- 0x3832 // char/int_guild.cpp
intif_parse_GuildMemberAdded // map/intif.cpp
guild_member_added // map/guild.cpp
intif_guild_leave -- 0x3034 // map/intif.cpp
clif_guild_inviteack -- 0x0169 // map/clif.cpp
guild_check_conflict // map/guild.cpp
guild_check_conflict_sub // map/guild.cpp
mapif_parse_GuildLeave // map/intif.cpp
>>>
mapif_guild_info -- 0x3831 // char/int_guild.cpp
intif_parse_guildInfo // map/intif.cpp
guild_recv_noinfo // map/guild.cpp
set guild_id to 0
guild_recv_info // map/guild.cpp
clif_guild_basicinfo --- 0x01b6 // map/clif.cpp
(client)
clif_guild_emblem ------ 0x0152 // map/clif.cpp
(client)
clif_guild_memberlist -- 0x0154 // map/clif.cpp
(client)
clif_guild_skillinfo --- 0x0162 // map/clif.cpp
(client)
clif_guild_belonginfo -- 0x016c // map/clif.cpp
(client)
clif_guild_notice ------ 0x016f // map/clif.cpp
Client handling of guild packets from tmwa[edit]
0x0167 SMSG_GUILD_CREATE_RESPONSE[edit]
processGuildCreateResponse
notify(GUILD_CREATED)[0]
notify(GUILD_ALREADY)[1]
notify(GUILD_ALREADY)[2]
notify(GUILD_EMPERIUM_CHECK_FAILED)[3]
notify(GUILD_ERROR)[default]
0x016c SMSG_GUILD_POSITION_INFO[edit]
processGuildPositionInfo
setGuildPositionFlags(Invite)
getGuild(guildID)
if not guild, return
setName(guildName)
setEmblemId(emblem)
{open guild tab}
{if local player}
set guild and guild name
0x016d SMSG_GUILD_MEMBER_LOGIN[edit]
processGuildMemberLogin
{if they're in our guild}
guildTab->showOnline(guildmember, online)
socialWindow->updateGuildCounter()
0x014e SMSG_GUILD_MASTER_OR_MEMBER[edit]
unimplemented?
processguildMasterOrMember // net/ea/guildhandler.cpp
msg.readInt32("type")
{0x57 for member, 0xd7 for master}
0x01b6 SMSG_GUILD_BASIC_INFO[edit]
processGuildBasicInfo // net/ea/guildhandler.cpp
{if guildTab && showBasicInfo}
print a bunch of stuff to guild chat
{get new or existing guild}
g->setName
g->setEmblemId
0x014c SMSG_GUILD_ALIANCE_INFO[edit]
unimplemented?
processGuildAllianceInfo // net/ea/guildhandler.cpp
{if msg length < 4 }
return
msg.readInt32("opposition")
msg.readInt32("guild id")
msg.raedString(24, "guild name")
0x0154 SMSG_GUILD_MEMBER_LIST[edit]
hair and hair color are skipped as well as the 50 bytes at the end of the packet
processGuildMemberList // net/ea/guildhandler.cpp
{if msg len < 4 }
return
{ if !taGuild }
return
taGuild->clearMembers()
{create a guild member and add to taGuild}
{ if guild member }
setOnline(online)
setID(id)
setCharId(charId)
setGender(intToGender(gender))
setLevel(level)
setExp(exp)
setPos(pos)
setRace(race)
{ if player can be found and their level != 'level' }
being->setLevel(level)
being->updateName()
increment onlineNum
increment totalNum
taGuild->sort()
{ if actorManager }
updatePlayerGuild()
updatePlayerColors()
{ if socialWindow }
updateGuildCounter(onlineNum, totalNum)
0x0166 SMSG_GUILD_POS_NAME_LIST[edit]
processGuildPosNameList // net/ea/guildhandler.cpp
{ if !taGuild }
return
{ if msg len < 4 }
return
taGuild->addPos(id, name)
0x0160 SMSG_GUILD_POS_INFO_LIST[edit]
unimplemented?
processGuildPosInfoList // net/ea/guildhandler.cpp
{ if msg len < 4 }
return
msg.readInt32("id")
msg.readInt32("mode")
msg.readInt32("same id")
msg.readInt32("exp mode")
0x0174 SMSG_GUILD_POSITION_CHANGED[edit]
unimplemented?
processGuildPositionChanged // net/ea/guildhandler.cpp
msg.readInt16("len")
msg.readInt32("id")
msg.readInt32("mode")
msg.readInt32("same ip")
msg.readInt32("exp mode")
msg.readString(24, "name")
0x0156 SMSG_GUILD_MEMBER_POS_CHANGE[edit]
unimplemented?
message length is skipped
processGuildPositionChanged // net/ea/guildhandler.cpp
{ if guild member(accountId, charId) exists }
setPos(pos)
0x0152 SMSG_GUILD_EMBLEM_DATA[edit]
unimplemented?
processGuildEmblemData // net/ea/guildhandler.cpp
length = "len"
msg.readInt32("guild id")
msg.readint32("emblem id")
{ if length < 12 }
return
msg.skip(length - 12, "emblem data")
0x0162 SMSG_GUILD_SKILL_INFO[edit]
skill points is unused
processGuildSkillInfo // net/ea/guildhandler.cpp
count = "len" - 6 / 37
{ if skillDialog }
hideSkills(SkillOwner::Guild)
{ try updating the skill }
{ if that failed, add the skill }
{ if skillDialog }
skillDialog->updateModels()
0x016f SMSG_GUILD_NOTICE[edit]
processGuildNotice // net/ea/guildhandler.cpp
msg1 = "msg1"
msg2 = "msg2"
{ if guildTab }
chatLog(msg1, BY_SERVER)
chatLog(msg2, BY_SERVER)
0x016a SMSG_GUILD_INVITE[edit]
processGuildInvite // net/ea/guildhandler.cpp
guildId = "guild id"
guildName = "guild name"
{ if socialWindow }
showGuildInvite(guildName, guildId, "")
0x0169 SMSG_GUILD_INVITE_ACK[edit]
processGuildInviteAck // net/ea/guildhandler.cpp
notify(GUILD_INVITE_FAILED) [0]
notify(GUILD_INVITE_REJECTED) [1]
notify(GUILD_INVITE_JOINED) [2]
notify(GUILD_INVITE_FULL) [3]
notify(GUILD_INVITE_ERROR) [default]
0x015a SMSG_GUILD_LEAVE[edit]
0x015c SMSG_GUILD_EXPULSION[edit]
0x0163 SMSG_GUILD_EXPULSION_LIST[edit]
0x017f SMSG_GUILD_MESSAGE[edit]
0x010e SMSG_GUILD_SKILL_UP[edit]
unimplemented?
processGuildSkillUp // net/ea/guildhandler.cpp
msg.readInt16("skill id")
msg.readInt16("level")
msg.readInt16("sp")
msg.readInt16("range")
msg.readUInt8("unused?")
0x0171 SMSG_GUILD_REQ_ALLIANCE[edit]
Implementation not planned at this time
0x0173 SMSG_GUILD_REQ_ALLIANCE_ACK[edit]
Implementation not planned at this time
0x0184 SMSG_GUILD_DEL_ALLIANCE[edit]
Implementation not planned at this time
0x0181 SMSG_GUILD_OPPOSITION_ACK[edit]
Implementation not planned at this time
0x015e SMSG_GUILD_BROKEN[edit]
unimplemented?
processGuildBroken
msg.readInt32("flag")