#pragma once // clif.hpp - Network interface to the client. // // Copyright © ????-2004 Athena Dev Teams // Copyright © 2004-2011 The Mana World Development Team // Copyright © 2011-2014 Ben Longbons // // This file is part of The Mana World (Athena server) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #include "../mmo/clif.t.hpp" #include "fwd.hpp" #include #include "../high/mmo.hpp" #include "../net/timer.t.hpp" #include "battle.t.hpp" #include "map.t.hpp" #include "pc.t.hpp" #include "../mmo/skill.t.hpp" namespace tmwa { namespace map { int clif_countusers(void); void clif_setwaitclose(Session *); int clif_authok(dumb_ptr); int clif_authfail_fd(Session *, int); int clif_charselectok(BlockId); int clif_dropflooritem(dumb_ptr); int clif_clearflooritem(dumb_ptr, Session *); int clif_clearchar(dumb_ptr, BeingRemoveWhy); // area or fd void clif_clearchar_id(BlockId, BeingRemoveWhy, Session *); int clif_spawnpc(dumb_ptr); //area int clif_spawnnpc(dumb_ptr); // area int clif_spawn_fake_npc_for_player(dumb_ptr sd, BlockId fake_npc_id); int clif_spawnmob(dumb_ptr); // area int clif_walkok(dumb_ptr); // self int clif_movechar(dumb_ptr); // area int clif_movemob(dumb_ptr); //area void clif_changemap(dumb_ptr, MapName, int, int); //self void clif_changemapserver(dumb_ptr, MapName, int, int, IP4Address, int); //self void clif_fixpos(dumb_ptr); // area int clif_fixmobpos(dumb_ptr md); int clif_fixpcpos(dumb_ptr sd); int clif_npcbuysell(dumb_ptr, BlockId); //self int clif_buylist(dumb_ptr, dumb_ptr); //self int clif_selllist(dumb_ptr); //self void clif_scriptmes(dumb_ptr, BlockId, XString); //self void clif_scriptnext(dumb_ptr, BlockId); //self void clif_scriptclose(dumb_ptr, BlockId); //self void clif_scriptmenu(dumb_ptr, BlockId, XString); //self void clif_scriptinput(dumb_ptr, BlockId); //self void clif_scriptinputstr(dumb_ptr sd, BlockId npcid); // self int clif_additem(dumb_ptr, IOff0, int, PickupFail); //self void clif_delitem(dumb_ptr, IOff0, int); //self int clif_updatestatus(dumb_ptr, SP); //self int clif_damage(dumb_ptr, dumb_ptr, tick_t, interval_t, interval_t, int, int, DamageType); // area inline int clif_takeitem(dumb_ptr src, dumb_ptr dst) { return clif_damage(src, dst, tick_t(), interval_t::zero(), interval_t::zero(), 0, 0, DamageType::TAKEITEM); } int clif_changelook(dumb_ptr, LOOK, int); // area void clif_changelook_accessories(dumb_ptr bl, dumb_ptr dst); // area or target; list gloves, boots etc. int clif_arrowequip(dumb_ptr sd, IOff0 val); //self int clif_arrow_fail(dumb_ptr sd, int type); //self int clif_statusupack(dumb_ptr, SP, int, int); // self int clif_equipitemack(dumb_ptr, IOff0, EPOS, int); // self int clif_unequipitemack(dumb_ptr, IOff0, EPOS, int); // self int clif_misceffect(dumb_ptr, int); // area int clif_changeoption(dumb_ptr); // area int clif_useitemack(dumb_ptr, IOff0, int, int); // self void clif_emotion(dumb_ptr bl, int type); void clif_sitting(Session *, dumb_ptr sd); // trade void clif_traderequest(dumb_ptr sd, CharName name); void clif_tradestart(dumb_ptr sd, int type); void clif_tradeadditem(dumb_ptr sd, dumb_ptr tsd, IOff2 index2, int amount); int clif_tradeitemok(dumb_ptr sd, IOff2 index, int amount, int fail); int clif_tradedeal_lock(dumb_ptr sd, int fail); int clif_tradecancelled(dumb_ptr sd); int clif_tradecompleted(dumb_ptr sd, int fail); // storage int clif_storageitemlist(dumb_ptr sd, Borrowed stor); int clif_storageequiplist(dumb_ptr sd, Borrowed stor); int clif_updatestorageamount(dumb_ptr sd, Borrowed stor); int clif_storageitemadded(dumb_ptr sd, Borrowed stor, SOff0 index, int amount); int clif_storageitemremoved(dumb_ptr sd, SOff0 index, int amount); int clif_storageclose(dumb_ptr sd); // map_forallinmovearea callbacks void clif_pcinsight(dumb_ptr, dumb_ptr); void clif_pcoutsight(dumb_ptr, dumb_ptr); void clif_mobinsight(dumb_ptr, dumb_ptr); void clif_moboutsight(dumb_ptr, dumb_ptr); void clif_skillinfoblock(dumb_ptr sd); int clif_skillup(dumb_ptr sd, SkillID skill_num); int clif_skillcastcancel(dumb_ptr bl); int clif_skill_fail(dumb_ptr sd, SkillID skill_id, int type, int btype); int clif_skill_damage(dumb_ptr src, dumb_ptr dst, tick_t tick, interval_t sdelay, interval_t ddelay, int damage, int div, SkillID skill_id, int skill_lv, int type); int clif_status_change(dumb_ptr bl, StatusChange type, int flag); void clif_wis_message(Session *s, CharName nick, XString mes); void clif_wis_end(Session *s, int flag); void clif_itemlist(dumb_ptr sd); void clif_equiplist(dumb_ptr sd); int clif_movetoattack(dumb_ptr sd, dumb_ptr bl); // party int clif_party_created(dumb_ptr sd, int flag); int clif_party_info(PartyPair p, Session *s); void clif_party_invite(dumb_ptr sd, dumb_ptr tsd); void clif_party_inviteack(dumb_ptr sd, CharName nick, int flag); void clif_party_option(PartyPair p, dumb_ptr sd, int flag); void clif_party_leaved(PartyPair p, dumb_ptr sd, AccountId account_id, CharName name, int flag); void clif_party_message(PartyPair p, AccountId account_id, XString mes); int clif_party_xy(PartyPair p, dumb_ptr sd); int clif_party_hp(PartyPair p, dumb_ptr sd); // atcommand void clif_displaymessage(Session *s, XString mes); void clif_GMmessage(dumb_ptr bl, XString mes, int flag); void clif_resurrection(dumb_ptr bl, int type); int clif_specialeffect(dumb_ptr bl, int type, int flag); // special effects [Valaris] void clif_message(dumb_ptr bl, XString msg); // messages (from mobs/npcs) [Valaris] int clif_GM_kick(dumb_ptr sd, dumb_ptr tsd, int type); int clif_foreachclient(std::function)>); // quest void clif_sendallquest(dumb_ptr sd); void clif_sendquest(dumb_ptr sd, QuestId questid, int value); void do_init_clif(void); } // namespace map } // namespace tmwa