private void HandleSetEncryptionPublicKey(Packet pkt) { Packet result = new Packet((byte)LogonOpcodes.LS_CRYPTION); result.SetInt64(0); Send(result); }
internal static void VersionCheck(User user) { Packet resut = new Packet(15); resut.SetByte(WIZ_VERSION_CHECK); resut.SetByte(0); resut.SetShort(__VERSION); resut.SetInt64(0); user.Send(resut); }
public void SendMyInfo() { SetUserAbility(false); Packet result = new Packet(WIZ_MYINFO); result.SByte(); result.SetShort(sSid); result.SetString(GetName()); result.SetShort(Convert.ToInt16(m_curx * 10)); result.SetShort(Convert.ToInt16(m_curz * 10)); result.SetShort(Convert.ToInt16(m_cury * 10)); result.SetByte(m_bNation); result.SetByte(m_bRace); result.SetShort(m_sClass); result.SetByte(m_bFace); result.SetDword(m_nHair); result.SetByte(m_bRank); result.SetByte(m_bTitle); result.SetShort(0); result.SetByte(GetLevel()); result.SetShort(m_sPoints); result.SetInt64(1/*SetMaxExp()*/); result.SetInt64(m_iExp); result.SetDword(m_iLoyalty); result.SetDword(m_iLoyaltyMonthly); result.SetShort(GetClanID()); result.SetByte(GetFame()); Knights pKnights = g_pMain.GetClanPtr(GetClanID()); if (pKnights == null) { result.SetInt64(0); result.SetShort(-1); result.SetDword(0); } else { pKnights.OnLogin(this); Knights pAllyClan = null; if (pKnights.GetAllianceID() > 0) pAllyClan = g_pMain.GetClanPtr(pKnights.GetAllianceID()); result.SetShort(pKnights.GetAllianceID()); result.SetByte(pKnights.m_byFlag); result.SetString(pKnights.m_strName); result.SetByte(pKnights.m_byGrade); result.SetByte(pKnights.m_byRanking); result.SetShort(pKnights.m_sMarkVersion); if (pAllyClan == null) result.SetShort(pKnights.m_sCape); else result.SetShort(pAllyClan.m_sCape); result.SetByte(pKnights.m_bCapeR); result.SetByte(pKnights.m_bCapeG); result.SetByte(pKnights.m_bCapeB); result.SetByte(0); } result.SetByte(2); result.SetByte(3); result.SetByte(4); result.SetByte(5); result.SetShort(m_iMaxHp); result.SetShort(m_sHp); result.SetShort(m_iMaxMp); result.SetShort(m_sMp); result.SetDword(m_sMaxWeight); result.SetDword(m_sItemWeight); result.SetByte(m_bStats[(int)StatType.STAT_STR]); result.SetByte((byte)GetStatItemBonus(StatType.STAT_STR)); result.SetByte(m_bStats[(int)StatType.STAT_STA]); result.SetByte((byte)GetStatItemBonus(StatType.STAT_STA)); result.SetByte(m_bStats[(int)StatType.STAT_DEX]); result.SetByte((byte)GetStatItemBonus(StatType.STAT_DEX)); result.SetByte(m_bStats[(int)StatType.STAT_INT]); result.SetByte((byte)GetStatItemBonus(StatType.STAT_INT)); result.SetByte(m_bStats[(int)StatType.STAT_CHA]); result.SetByte((byte)GetStatItemBonus(StatType.STAT_CHA)); result.SetShort(m_sTotalHit); result.SetShort(m_sTotalAc); result.SetByte((byte)m_sFireR); result.SetByte((byte)m_sColdR); result.SetByte((byte)m_sLightningR); result.SetByte((byte)m_sMagicR); result.SetByte((byte)m_sDiseaseR); result.SetByte((byte)m_sPoisonR); result.SetDword(m_iGold); result.SetByte(m_bAuthority); result.SetByte(m_bKnightsRank); result.SetByte(m_bPersonalRank); result.append(m_bstrSkill, 9); for (int i = 0; i < INVENTORY_TOTAL; i++) { _ITEM_DATA pItem = GetItem(i); if (pItem == null) { pItem = new _ITEM_DATA(); } if (pItem.sRemainingRentalTime < UNIXTIME) pItem.sRemainingRentalTime = 0; if (pItem.nExpirationTime < UNIXTIME) pItem.nExpirationTime = 0; result.SetDword(pItem.nNum); result.SetShort(pItem.sDuration); result.SetShort(pItem.sCount); result.SetByte(pItem.bFlag); // item type flag (e.g. rented) result.SetShort(pItem.sRemainingRentalTime); // remaining time result.SetDword(0); // unknown result.SetDword(pItem.nExpirationTime); // expiration date in unix time } result.SetByte(m_bAccountStatus); result.SetByte(m_bPremiumType); result.SetShort(m_sPremiumTime); result.SetByte(m_bIsChicken); // Yumurta result.SetDword(m_iMannerPoint); result.SetShort(0); result.SetDword(0); // Military Camp result.SetShort(m_sGenieTime);// Genie Send(result); if (!g_pMain.AddUserInGame(GetID(), this)) OnDisconnect(); else bGameStart = true; Console.WriteLine("Send My info Gönderildi."); }