C# Class SagaMap.MapClient

Show file Open project: Willyham/SagaRO2 Class Usage Examples

Public Properties

Property Type Description
Char SagaDB.Actors.ActorPC
Party Party.Party
Pc PC
RewardChoice List
RewardFunc Delegate
TradeItems byte>.Dictionary
TradeMoney int
initialized bool
lastHeartbeat long
map Map
state SESSION_STATE

Public Methods

Method Description
CheckWeaponEXP ( ) : void
Disconnect ( ) : void
MapClient ( Socket mSock, Packet>.Dictionary mCommandTable, uint session ) : System
MapClient ( uint session ) : System
OnCorpseCleared ( Packets p ) : void
OnDeleteItem ( SagaMap p ) : void
OnDisconnect ( ) : void
OnDiveDown ( ) : void

The character is going underwater, activate the oxygen task.

OnDiveUp ( ) : void
OnDropSelect ( SagaMap p ) : void
OnGetAttribute ( SagaMap p ) : void
OnGetCancel ( SagaMap p ) : void
OnGetHateInfo ( SagaMap p ) : void
OnHeartbeat ( Packets p ) : void
OnItemToggle ( SagaMap p ) : void
OnJobChange ( Packets p ) : void

Call the job change method from the PC class. Pc.OnJobChange

OnJobChangeCosts ( SagaMap p ) : void
OnLeaveNPC ( Packets p ) : void
OnLogout ( SagaMap p ) : void
OnMarketBuyItem ( Packets p ) : void
OnMarketDeleteItem ( Packets p ) : void
OnMarketGetComment ( Packets p ) : void
OnMarketGetMessage ( Packets p ) : void
OnMarketOwnItem ( Packets p ) : void
OnMarketRegister ( Packets p ) : void
OnMarketSearch ( Packets p ) : void
OnMarketUpdateComment ( Packets p ) : void
OnMoveItem ( SagaMap p ) : void
OnMoveWeapon ( SagaMap p ) : void
OnNPCChat ( Npc npc ) : void
OnNPCChat ( Packets p ) : void
OnNPCDropList ( SagaMap p ) : void
OnNPCMenu ( Packets p ) : void
OnNPCShopBuy ( SagaMap p ) : void
OnNPCShopSell ( SagaMap p ) : void
OnPartyAccept ( SagaMap p ) : void
OnPartyInvite ( SagaMap p ) : void

Will be called if a player sends a party invite packet

OnPartyInviteCancel ( SagaMap p ) : void
OnPartyKick ( SagaMap p ) : void
OnPartyMode ( SagaMap p ) : void
OnPartyQuit ( SagaMap p ) : void
OnPersonalRequest ( Packets p ) : void
OnQuestCompleted ( Packets p ) : void
OnQuestConfirm ( Packets p ) : void
OnQuestConfirmCancel ( Packets p ) : void
OnQuestRewardChoice ( Packets p ) : void
OnRemoveSpecialSkill ( Packets p ) : void
OnRepaireEquip ( Packets p ) : void
OnSelectButton ( SagaMap p ) : void
OnSendChangeState ( SagaMap p ) : void

Update the state of the client and send to all other actors

OnSendChat ( SagaMap p ) : void

Receive the chat from the client, check if its an AtCommand (GM command). Send the output to all the clients in the area.

OnSendDemandMapID ( SagaMap p ) : void

Receive the packet from the client that demands for the mapid.

OnSendFall ( Packets p ) : void

Receive the fall from the client. Damage the client for an 8th of the units fallen? Send the client the result of the fall.

OnSendGUID ( SagaMap p ) : void
OnSendHomePoint ( SagaMap p ) : void

If the client is dead, send back to the home point. If the type is 1, send back to a save point at the Cattleya's co=ords. Remove some durability from the items as a dying penalty.

OnSendIdentity ( SagaMap p ) : void

Receive the identity of the client.

OnSendJump ( SagaMap p ) : void

Receive the client jumping. If the client was sitting, remove the Regeneration bonus. Broardcast the jump to all actors.

OnSendKey ( SagaMap p ) : void
OnSendMapLoaded ( SagaMap p ) : void

Get a packet from the client indicated it's done loading.

OnSendMoveStart ( SagaMap p ) : void

Receive the movement vector from the client. Standard running speed is 500, or 250 for running backwards.

OnSendMoveStop ( SagaMap p ) : void

Receive the signal that a character stopped moving.

OnSendUsePortal ( SagaMap p ) : void

Receive a portal usage from the client, check the portal in the PortalManager Raise a warning if the portal isn't found. PortalManager.GetPortal

OnSendWhisper ( SagaMap p ) : void

Receive the whisper from the client. Check if the recipient is online from the MapClientManager Send a whisper to the other player.

OnSendYaw ( SagaMap p ) : void

Receive the yaw from the client when the user rotates the screen. Should be used to calculate the direction to the monster for attacking

OnSetSpecialSkill ( Packets p ) : void
OnSkillAddSpecial ( SagaMap p ) : void
OnSkillCast ( Packets p ) : void
OnSkillCastCancel ( Packets p ) : void
OnSkillToggle ( Packets p ) : void
OnSortInvList ( SagaMap p ) : void
OnStatUpdate ( SagaMap p ) : void

Receive the stat update from the client. The input is checked in the PC class to make sure the client doesn't try and add points they don't have. Send all the updates to the client. Pc.OnStatUpdate

OnSupplyExchange ( Packets p ) : void
OnSupplySelect ( Packets p ) : void
OnTrade ( SagaMap p ) : void
OnTradeCancel ( SagaMap p ) : void
OnTradeConfirm ( SagaMap p ) : void
OnTradeItem ( SagaMap p ) : void
OnTradeListConfirm ( SagaMap p ) : void
OnTradeMoney ( SagaMap p ) : void
OnTradeOther ( SagaMap p ) : void
OnUseDye ( SagaMap p ) : void
OnUseMap ( Packets p ) : void
OnUseOffensiveSkill ( Packets p ) : void
OnUsePromiseStone ( byte map, float x, float y, float z ) : void
OnWantQuestGroupList ( SagaMap p ) : void

07 01 Receive the quest group list from the client.

OnWantSetSpeciality ( Packets p ) : void
OnWarp ( Packets p ) : void
OnWeaponAuge ( SagaMap p ) : void
OnWeaponSwitch ( SagaMap p ) : void
OnWeaponUpgrade ( Packets p ) : void
OxygenTakeDamage ( ) : void

When oxygen runs out, damage the char for 10% of health per second.

RequestHeartbeat ( ) : void
ResetTradeItems ( byte type ) : void
ResetTradeStatus ( byte type ) : void
SendBattleStatus ( ) : void

Update the Battle Status in client's equipment window

SendCharStatus ( ushort visiblefield ) : void

Send all the status to the client. Send: Job, EXP, HP/SP, LC/LP and basic info on all other party members

SendEquipList ( ) : void

Get a list of the equipment (which is equiped, not just the items).

SendExtStats ( ) : void

Send the stats to the client TODO: Add stat bonuses for jobs.

SendInventoryList ( ) : void

Get a list of the inventory items and send it to the client.

SendMaxInvSlots ( ) : void

Send invetory slot count. Default value 254

SendMessage ( string from, string text ) : void

Send a message to the client

SendMessage ( string from, string text, Packets type ) : void

Send a message to the client

SendPartyInviteResult ( Packets result ) : void
SendQuestInfo ( ) : void

Send the Quest information of a client

SendShortcutsList ( ) : void

Send a shortcut list to the client aka 'Quick Page'.

SendSkillEffect ( uint addition, SkillEffects effect, uint amount ) : void
SendSkillList ( ) : void

Send the skill list to the client. Skills sorted by Battle, Living and Special.

SendTradeResult ( TradeResults result ) : void
SendTradeStatus ( uint targetid, TradeResults status ) : void
SendTradeStatusOther ( uint targetid, TradeResults status ) : void
SendWeaponList ( ) : void

Send a list of weapons currently in use

SendZeny ( ) : void

Update the Zeny of the client. One value for Zeny and Rufi. '12000' = 1 Zeni 2000 Rufi.

ToString ( ) : string
UpdateSkillEXP ( uint id, uint exp ) : void

Add EXP to a skill and update the client.

UpdateWeaponInfo ( Packets type, uint value ) : void

Make an update to the weapon

Private Methods

Method Description
CheckMarketItemValid ( List list ) : void

check if a marketplace item is still valid

Method Details

CheckWeaponEXP() public method

public CheckWeaponEXP ( ) : void
return void

Disconnect() public method

public Disconnect ( ) : void
return void

MapClient() public method

public MapClient ( Socket mSock, Packet>.Dictionary mCommandTable, uint session ) : System
mSock Socket
mCommandTable Packet>.Dictionary
session uint
return System

MapClient() public method

public MapClient ( uint session ) : System
session uint
return System

OnCorpseCleared() public method

public OnCorpseCleared ( Packets p ) : void
p Packets
return void

OnDeleteItem() public method

public OnDeleteItem ( SagaMap p ) : void
p SagaMap
return void

OnDisconnect() public method

public OnDisconnect ( ) : void
return void

OnDiveDown() public method

The character is going underwater, activate the oxygen task.
public OnDiveDown ( ) : void
return void

OnDiveUp() public method

public OnDiveUp ( ) : void
return void

OnDropSelect() public method

public OnDropSelect ( SagaMap p ) : void
p SagaMap
return void

OnGetAttribute() public method

public OnGetAttribute ( SagaMap p ) : void
p SagaMap
return void

OnGetCancel() public method

public OnGetCancel ( SagaMap p ) : void
p SagaMap
return void

OnGetHateInfo() public method

public OnGetHateInfo ( SagaMap p ) : void
p SagaMap
return void

OnHeartbeat() public method

public OnHeartbeat ( Packets p ) : void
p Packets
return void

OnItemToggle() public method

public OnItemToggle ( SagaMap p ) : void
p SagaMap
return void

OnJobChange() public method

Call the job change method from the PC class. Pc.OnJobChange
public OnJobChange ( Packets p ) : void
p Packets
return void

OnJobChangeCosts() public method

public OnJobChangeCosts ( SagaMap p ) : void
p SagaMap
return void

OnLeaveNPC() public method

public OnLeaveNPC ( Packets p ) : void
p Packets
return void

OnLogout() public method

public OnLogout ( SagaMap p ) : void
p SagaMap
return void

OnMarketBuyItem() public method

public OnMarketBuyItem ( Packets p ) : void
p Packets
return void

OnMarketDeleteItem() public method

public OnMarketDeleteItem ( Packets p ) : void
p Packets
return void

OnMarketGetComment() public method

public OnMarketGetComment ( Packets p ) : void
p Packets
return void

OnMarketGetMessage() public method

public OnMarketGetMessage ( Packets p ) : void
p Packets
return void

OnMarketOwnItem() public method

public OnMarketOwnItem ( Packets p ) : void
p Packets
return void

OnMarketRegister() public method

public OnMarketRegister ( Packets p ) : void
p Packets
return void

OnMarketSearch() public method

public OnMarketSearch ( Packets p ) : void
p Packets
return void

OnMarketUpdateComment() public method

public OnMarketUpdateComment ( Packets p ) : void
p Packets
return void

OnMoveItem() public method

public OnMoveItem ( SagaMap p ) : void
p SagaMap
return void

OnMoveWeapon() public method

public OnMoveWeapon ( SagaMap p ) : void
p SagaMap
return void

OnNPCChat() public method

public OnNPCChat ( Npc npc ) : void
npc Npc
return void

OnNPCChat() public method

public OnNPCChat ( Packets p ) : void
p Packets
return void

OnNPCDropList() public method

public OnNPCDropList ( SagaMap p ) : void
p SagaMap
return void

OnNPCMenu() public method

public OnNPCMenu ( Packets p ) : void
p Packets
return void

OnNPCShopBuy() public method

public OnNPCShopBuy ( SagaMap p ) : void
p SagaMap
return void

OnNPCShopSell() public method

public OnNPCShopSell ( SagaMap p ) : void
p SagaMap
return void

OnPartyAccept() public method

public OnPartyAccept ( SagaMap p ) : void
p SagaMap
return void

OnPartyInvite() public method

Will be called if a player sends a party invite packet
public OnPartyInvite ( SagaMap p ) : void
p SagaMap packet instance containing the to be invited player's name
return void

OnPartyInviteCancel() public method

public OnPartyInviteCancel ( SagaMap p ) : void
p SagaMap
return void

OnPartyKick() public method

public OnPartyKick ( SagaMap p ) : void
p SagaMap
return void

OnPartyMode() public method

public OnPartyMode ( SagaMap p ) : void
p SagaMap
return void

OnPartyQuit() public method

public OnPartyQuit ( SagaMap p ) : void
p SagaMap
return void

OnPersonalRequest() public method

public OnPersonalRequest ( Packets p ) : void
p Packets
return void

OnQuestCompleted() public method

public OnQuestCompleted ( Packets p ) : void
p Packets
return void

OnQuestConfirm() public method

public OnQuestConfirm ( Packets p ) : void
p Packets
return void

OnQuestConfirmCancel() public method

public OnQuestConfirmCancel ( Packets p ) : void
p Packets
return void

OnQuestRewardChoice() public method

public OnQuestRewardChoice ( Packets p ) : void
p Packets
return void

OnRemoveSpecialSkill() public method

public OnRemoveSpecialSkill ( Packets p ) : void
p Packets
return void

OnRepaireEquip() public method

public OnRepaireEquip ( Packets p ) : void
p Packets
return void

OnSelectButton() public method

public OnSelectButton ( SagaMap p ) : void
p SagaMap
return void

OnSendChangeState() public method

Update the state of the client and send to all other actors
public OnSendChangeState ( SagaMap p ) : void
p SagaMap
return void

OnSendChat() public method

Receive the chat from the client, check if its an AtCommand (GM command). Send the output to all the clients in the area.
public OnSendChat ( SagaMap p ) : void
p SagaMap
return void

OnSendDemandMapID() public method

Receive the packet from the client that demands for the mapid.
public OnSendDemandMapID ( SagaMap p ) : void
p SagaMap
return void

OnSendFall() public method

Receive the fall from the client. Damage the client for an 8th of the units fallen? Send the client the result of the fall.
public OnSendFall ( Packets p ) : void
p Packets
return void

OnSendGUID() public method

public OnSendGUID ( SagaMap p ) : void
p SagaMap
return void

OnSendHomePoint() public method

If the client is dead, send back to the home point. If the type is 1, send back to a save point at the Cattleya's co=ords. Remove some durability from the items as a dying penalty.
public OnSendHomePoint ( SagaMap p ) : void
p SagaMap
return void

OnSendIdentity() public method

Receive the identity of the client.
public OnSendIdentity ( SagaMap p ) : void
p SagaMap
return void

OnSendJump() public method

Receive the client jumping. If the client was sitting, remove the Regeneration bonus. Broardcast the jump to all actors.
public OnSendJump ( SagaMap p ) : void
p SagaMap
return void

OnSendKey() public method

public OnSendKey ( SagaMap p ) : void
p SagaMap
return void

OnSendMapLoaded() public method

Get a packet from the client indicated it's done loading.
public OnSendMapLoaded ( SagaMap p ) : void
p SagaMap
return void

OnSendMoveStart() public method

Receive the movement vector from the client. Standard running speed is 500, or 250 for running backwards.
public OnSendMoveStart ( SagaMap p ) : void
p SagaMap
return void

OnSendMoveStop() public method

Receive the signal that a character stopped moving.
public OnSendMoveStop ( SagaMap p ) : void
p SagaMap
return void

OnSendUsePortal() public method

Receive a portal usage from the client, check the portal in the PortalManager Raise a warning if the portal isn't found. PortalManager.GetPortal
public OnSendUsePortal ( SagaMap p ) : void
p SagaMap
return void

OnSendWhisper() public method

Receive the whisper from the client. Check if the recipient is online from the MapClientManager Send a whisper to the other player.
public OnSendWhisper ( SagaMap p ) : void
p SagaMap
return void

OnSendYaw() public method

Receive the yaw from the client when the user rotates the screen. Should be used to calculate the direction to the monster for attacking
public OnSendYaw ( SagaMap p ) : void
p SagaMap
return void

OnSetSpecialSkill() public method

public OnSetSpecialSkill ( Packets p ) : void
p Packets
return void

OnSkillAddSpecial() public method

public OnSkillAddSpecial ( SagaMap p ) : void
p SagaMap
return void

OnSkillCast() public method

public OnSkillCast ( Packets p ) : void
p Packets
return void

OnSkillCastCancel() public method

public OnSkillCastCancel ( Packets p ) : void
p Packets
return void

OnSkillToggle() public method

public OnSkillToggle ( Packets p ) : void
p Packets
return void

OnSortInvList() public method

public OnSortInvList ( SagaMap p ) : void
p SagaMap
return void

OnStatUpdate() public method

Receive the stat update from the client. The input is checked in the PC class to make sure the client doesn't try and add points they don't have. Send all the updates to the client. Pc.OnStatUpdate
public OnStatUpdate ( SagaMap p ) : void
p SagaMap
return void

OnSupplyExchange() public method

public OnSupplyExchange ( Packets p ) : void
p Packets
return void

OnSupplySelect() public method

public OnSupplySelect ( Packets p ) : void
p Packets
return void

OnTrade() public method

public OnTrade ( SagaMap p ) : void
p SagaMap
return void

OnTradeCancel() public method

public OnTradeCancel ( SagaMap p ) : void
p SagaMap
return void

OnTradeConfirm() public method

public OnTradeConfirm ( SagaMap p ) : void
p SagaMap
return void

OnTradeItem() public method

public OnTradeItem ( SagaMap p ) : void
p SagaMap
return void

OnTradeListConfirm() public method

public OnTradeListConfirm ( SagaMap p ) : void
p SagaMap
return void

OnTradeMoney() public method

public OnTradeMoney ( SagaMap p ) : void
p SagaMap
return void

OnTradeOther() public method

public OnTradeOther ( SagaMap p ) : void
p SagaMap
return void

OnUseDye() public method

public OnUseDye ( SagaMap p ) : void
p SagaMap
return void

OnUseMap() public method

public OnUseMap ( Packets p ) : void
p Packets
return void

OnUseOffensiveSkill() public method

public OnUseOffensiveSkill ( Packets p ) : void
p Packets
return void

OnUsePromiseStone() public method

public OnUsePromiseStone ( byte map, float x, float y, float z ) : void
map byte
x float
y float
z float
return void

OnWantQuestGroupList() public method

07 01 Receive the quest group list from the client.
public OnWantQuestGroupList ( SagaMap p ) : void
p SagaMap
return void

OnWantSetSpeciality() public method

public OnWantSetSpeciality ( Packets p ) : void
p Packets
return void

OnWarp() public method

public OnWarp ( Packets p ) : void
p Packets
return void

OnWeaponAuge() public method

public OnWeaponAuge ( SagaMap p ) : void
p SagaMap
return void

OnWeaponSwitch() public method

public OnWeaponSwitch ( SagaMap p ) : void
p SagaMap
return void

OnWeaponUpgrade() public method

public OnWeaponUpgrade ( Packets p ) : void
p Packets
return void

OxygenTakeDamage() public method

When oxygen runs out, damage the char for 10% of health per second.
public OxygenTakeDamage ( ) : void
return void

RequestHeartbeat() public method

public RequestHeartbeat ( ) : void
return void

ResetTradeItems() public method

public ResetTradeItems ( byte type ) : void
type byte
return void

ResetTradeStatus() public method

public ResetTradeStatus ( byte type ) : void
type byte
return void

SendBattleStatus() public method

Update the Battle Status in client's equipment window
public SendBattleStatus ( ) : void
return void

SendCharStatus() public method

Send all the status to the client. Send: Job, EXP, HP/SP, LC/LP and basic info on all other party members
public SendCharStatus ( ushort visiblefield ) : void
visiblefield ushort 0 for none, 4 for jexp, 32 for cexp, 36 for both
return void

SendEquipList() public method

Get a list of the equipment (which is equiped, not just the items).
public SendEquipList ( ) : void
return void

SendExtStats() public method

Send the stats to the client TODO: Add stat bonuses for jobs.
public SendExtStats ( ) : void
return void

SendInventoryList() public method

Get a list of the inventory items and send it to the client.
public SendInventoryList ( ) : void
return void

SendMaxInvSlots() public method

Send invetory slot count. Default value 254
public SendMaxInvSlots ( ) : void
return void

SendMessage() public method

Send a message to the client
public SendMessage ( string from, string text ) : void
from string Who to display the message from
text string The text to send to the client
return void

SendMessage() public method

Send a message to the client
public SendMessage ( string from, string text, Packets type ) : void
from string Who to display the message from
text string The text to send to the client
type Packets Type: NORMAL, PARTY, YELL, SYSTEM_MESSAGE, CHANEL, SYSTEM_MESSAGE_RED
return void

SendPartyInviteResult() public method

public SendPartyInviteResult ( Packets result ) : void
result Packets
return void

SendQuestInfo() public method

Send the Quest information of a client
public SendQuestInfo ( ) : void
return void

SendShortcutsList() public method

Send a shortcut list to the client aka 'Quick Page'.
public SendShortcutsList ( ) : void
return void

SendSkillEffect() public method

public SendSkillEffect ( uint addition, SkillEffects effect, uint amount ) : void
addition uint
effect SkillEffects
amount uint
return void

SendSkillList() public method

Send the skill list to the client. Skills sorted by Battle, Living and Special.
public SendSkillList ( ) : void
return void

SendTradeResult() public method

public SendTradeResult ( TradeResults result ) : void
result TradeResults
return void

SendTradeStatus() public method

public SendTradeStatus ( uint targetid, TradeResults status ) : void
targetid uint
status TradeResults
return void

SendTradeStatusOther() public method

public SendTradeStatusOther ( uint targetid, TradeResults status ) : void
targetid uint
status TradeResults
return void

SendWeaponList() public method

Send a list of weapons currently in use
public SendWeaponList ( ) : void
return void

SendZeny() public method

Update the Zeny of the client. One value for Zeny and Rufi. '12000' = 1 Zeni 2000 Rufi.
public SendZeny ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

UpdateSkillEXP() public method

Add EXP to a skill and update the client.
public UpdateSkillEXP ( uint id, uint exp ) : void
id uint Skill Id to update
exp uint Ammount of EXP
return void

UpdateWeaponInfo() public method

Make an update to the weapon
public UpdateWeaponInfo ( Packets type, uint value ) : void
type Packets Level, EXP, Durability
value uint value to add
return void

Property Details

Char public property

The ActorPC associated with this session.
public ActorPC,SagaDB.Actors Char
return SagaDB.Actors.ActorPC

Party public property

public Party.Party Party
return Party.Party

Pc public property

public PC Pc
return PC

RewardChoice public property

public List RewardChoice
return List

RewardFunc public property

public Delegate RewardFunc
return Delegate

TradeItems public property

public Dictionary TradeItems
return byte>.Dictionary

TradeMoney public property

public int TradeMoney
return int

initialized public property

public bool initialized
return bool

lastHeartbeat public property

The time of the last heartbeat answer from the client.
public long lastHeartbeat
return long

map public property

The Map associated with this session.
public Map map
return Map

state public property

public SESSION_STATE state
return SESSION_STATE