コード例 #1
0
ファイル: charserver.cpp プロジェクト: karlseven/ROED
// Incoming packet
bool CCharServer::OnReceivePacket( CClientSocket* thisclient, CPacket *P )
{
    switch( P->Command )
    {
    case 0x0500:
        return pakWSReady          ( (CCharClient*)thisclient, P );
    case 0x0501:
        return pakLoginConnected   ( (CCharClient*)thisclient, P );
    case 0x0502:
        return pakLoginDSClient    ( (CCharClient*)thisclient, P );
    case 0x0505:
        return pakWSCharSelect     ( (CCharClient*)thisclient, P );

    case 0x070b:
        return pakDoIdentify       ( (CCharClient*)thisclient, P );

    case 0x0712:
        return pakGetCharacters    ( (CCharClient*)thisclient, P );
    case 0x0713:
        return pakCreateChar       ( (CCharClient*)thisclient, P );
    case 0x0714:
        return pakDeleteChar       ( (CCharClient*)thisclient, P );
    case 0x0715:
        return pakRequestWorld     ( (CCharClient*)thisclient, P );

    case 0x0787:
        return pakClanChat         ( (CCharClient*)thisclient, P );

    case 0x079e:
        return pakUpdateLevel      ( (CCharClient*)thisclient, P );

    case 0x07e0:
        return pakClanManager      ( (CCharClient*)thisclient, P );
    case 0x07e1:
        return pakMessengerManager ( (CCharClient*)thisclient, P );
    case 0x07e2:
        return pakMessengerChat    ( (CCharClient*)thisclient, P );
    case 0x07e3:
        return pakChatrooms        ( (CCharClient*)thisclient, P );
    case 0x07e4:
        return pakTalkChatroom     ( (CCharClient*)thisclient, P );
    case 0x07e5:
        return pak7e5              ( (CCharClient*)thisclient, P );
    case 0x07e6:
        return pakUploadCM         ( (CCharClient*)thisclient, P );
    case 0x07e7:
        return pakDownloadCM       ( (CCharClient*)thisclient, P );
    case 0x07e8:
        return pakClanIconTime     ( (CCharClient*)thisclient, P );

    case 0x0808:
        return true; //LMA: GG Packet here too.
    default:
        Log( MSG_WARNING, "Unknown Packet <%04x> Size <%i>", P->Command, P->Size-6 );
        break;
    }
    return true;
}
コード例 #2
0
ファイル: worldserver.cpp プロジェクト: TheDgtl/osrose
// Incoming packet
bool CWorldServer::OnReceivePacket( CClientSocket* thisclient, CPacket *P )
{
	switch( P->Command )
	{
        case 0x0500: return pakCSReady          ( (CPlayer*)thisclient->player, P );
        case 0x0502: return pakCharDSClient     ( (CPlayer*)thisclient->player, P );
    	case 0x0505: return pakCSCharSelect     ( (CPlayer*)thisclient->player, P );
    	//case 0x0756: return true;//unknown
    	case 0x0756: return pakChangeRespawn ( (CPlayer*)thisclient->player, P );
        case 0x0700: return pakPing             ( (CPlayer*)thisclient->player, P );
    	case 0x0707: return pakExit             ( (CPlayer*)thisclient->player, P );
    	case 0x070b: return pakDoIdentify       ( (CPlayer*)thisclient->player, P );
    	case 0x071c: return pakCharSelect       ( (CPlayer*)thisclient->player, P );
    	case 0x0730: return pakGiveQuest        ( (CPlayer*)thisclient->player, P );
    	case 0x0753: return pakDoID             ( (CPlayer*)thisclient->player, P );
    	case 0x0755: return pakUserDied         ( (CPlayer*)thisclient->player, P );
    	case 0x0762: return pakWeight           ( (CPlayer*)thisclient->player, P );
    	case 0x0771: return pakStopChar         ( (CPlayer*)thisclient->player, P );
    	case 0x0781: return pakDoEmote          ( (CPlayer*)thisclient->player, P );
    	case 0x0782: return pakChangeStance     ( (CPlayer*)thisclient->player, P );
    	case 0x0783: return pakNormalChat       ( (CPlayer*)thisclient->player, P );
    	case 0x0784: return pakWhisper          ( (CPlayer*)thisclient->player, P );
    	case 0x0785: return pakShout            ( (CPlayer*)thisclient->player, P );
    	case 0x0786: return pakPartyChat        ( (CPlayer*)thisclient->player, P );
    	case 0x0798: return pakStartAttack      ( (CPlayer*)thisclient->player, P );
      	case 0x079f: return pakShowHeal         ( (CPlayer*)thisclient->player, P );
    	case 0x079a: return pakMoveChar         ( (CPlayer*)thisclient->player, P );
    	case 0x07a1: return pakNPCBuy           ( (CPlayer*)thisclient->player, P );
        case 0x07a3: return pakUseItem          ( (CPlayer*)thisclient->player, P );
        case 0x07a4: return pakDoDrop           ( (CPlayer*)thisclient->player, P );
    	case 0x07a5: return pakChangeEquip      ( (CPlayer*)thisclient->player, P );
    	case 0x07a7: return pakPickDrop         ( (CPlayer*)thisclient->player, P );
    	case 0x07a8: return pakGate             ( (CPlayer*)thisclient->player, P );
    	case 0x07a9: return pakAddStats         ( (CPlayer*)thisclient->player, P );
    	case 0x07aa: return pakMoveSkill        ( (CPlayer*)thisclient->player, P );
    	case 0x07ab: return pakEquipABC         ( (CPlayer*)thisclient->player, P );
    	case 0x07af: return pakCraft            ( (CPlayer*)thisclient->player, P );
        case 0x07b1: return pakLevelUpSkill     ( (CPlayer*)thisclient->player, P );
        case 0x07b2: return pakSkillSelf        ( (CPlayer*)thisclient->player, P );
    	case 0x07b3: return pakStartSkill       ( (CPlayer*)thisclient->player, P );
    	case 0x07b4: return pakSkillAOE         ( (CPlayer*)thisclient->player, P );
    	case 0x07c0: return pakTradeAction      ( (CPlayer*)thisclient->player, P );
    	case 0x07c1: return pakTradeAdd         ( (CPlayer*)thisclient->player, P );
    	case 0x07ad: return pakStorage          ( (CPlayer*)thisclient->player, P );
    	case 0x07ae: return pakChangeStorage    ( (CPlayer*)thisclient->player, P );
    	case 0x07ba: return pakidentify         ( (CPlayer*)thisclient->player, P );
    	case 0x07bc: return pakModifiedItem     ( (CPlayer*)thisclient->player, P );
    	case 0x07bf: return pakAddWishList      ( (CPlayer*)thisclient->player, P );
    	case 0x07c2: return pakOpenShop         ( (CPlayer*)thisclient->player, P );
    	case 0x07c3: return pakCloseShop        ( (CPlayer*)thisclient->player, P );
        case 0x07c4: return pakShowShop         ( (CPlayer*)thisclient->player, P );
        case 0x07c5: return pakBuyShop          ( (CPlayer*)thisclient->player, P );
        case 0x07c6: return pakSellShop         ( (CPlayer*)thisclient->player, P );
    	case 0x07ca: return pakChangeCart       ( (CPlayer*)thisclient->player, P );
    	//case 0x07cb: return pakRepairItem       ( (CPlayer*)thisclient->player, P );
    	case 0x07cb: return pakRepairItem       ( (CPlayer*)thisclient->player, P,2);   //LMA: tool repair.
    	case 0x07cd: return pakRepairItem       ( (CPlayer*)thisclient->player, P,1);   //LMA: NPC repair.
    	case 0x07d0: return pakPartyActions     ( (CPlayer*)thisclient->player, P );
    	case 0x07d1: return pakPartyManager     ( (CPlayer*)thisclient->player, P );
    	case 0x07d7: return pakPartyOption      ( (CPlayer*)thisclient->player, P );
    	case 0x07d8: return pakModifiedItemDone ( (CPlayer*)thisclient->player, P );
        case 0x07d9: return pakItemMall         ( (CPlayer*)thisclient->player, P );
    	case 0x07da: return pakStoreZuly        ( (CPlayer*)thisclient->player, P );
    	case 0x07dd: return pakRideRequest      ( (CPlayer*)thisclient->player, P );
    	case 0x07e0: return pakCreateClan       ( (CPlayer*)thisclient->player, P );
    	case 0x07e1: return pakClanManager      ( (CPlayer*)thisclient->player, P );
    	case 0x07eb: return pakPrintscreen      ( (CPlayer*)thisclient->player, P );
    	case 0x0808: return pakGameGuard        ( (CPlayer*)thisclient->player, P );
    	case 0x0821: return pakExpTC        ( (CPlayer*)thisclient->player, P );  //LMA: Bonus Time Coupon
    	case 0x0796: return pakPvp796        ( (CPlayer*)thisclient->player, P );  //LMA: PVP?
    	default:
    		Log( MSG_WARNING, "(SID:%i) Received unknown packet. Command:%04x Size:%04x", thisclient->sock, P->Command, P->Size );
		break;
	}
	return true;
}