00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MAINACTOR_H
00020 #define MAINACTOR_H
00021
00022 #include "Actor.h"
00023
00024 struct WeaponOverlayFrame;
00025
00026 class MainActor : public Actor
00027 {
00028 public:
00029 MainActor();
00030 virtual ~MainActor();
00031
00032 virtual bool CanAddItem(Item* item, bool checkwghtvol=false);
00033 virtual bool addItem(Item* item, bool checkwghtvol=false);
00034
00036 virtual void teleport(int mapnum, sint32 x, sint32 y, sint32 z);
00037
00041 void teleport(int mapnum, int teleport_id);
00042
00043 bool hasJustTeleported() const { return justTeleported; }
00044 void setJustTeleported(bool t) { justTeleported = t; }
00045
00048 void accumulateStr(int n);
00049
00052 void accumulateDex(int n);
00053
00056 void accumulateInt(int n);
00057
00059 virtual GravityProcess* ensureGravityProcess();
00060
00061 virtual uint32 getArmourClass();
00062 virtual uint16 getDefenseType();
00063 virtual sint16 getAttackingDex();
00064 virtual sint16 getDefendingDex();
00065
00066 virtual uint16 getDamageType();
00067 virtual int getDamageAmount();
00068
00069 virtual void receiveHit(uint16 other, int dir, int damage, uint16 type);
00070
00071 virtual void setInCombat();
00072 virtual void clearInCombat();
00073
00074 virtual ProcId die(uint16 DamageType);
00075
00076 std::string getName() { return name; }
00077 void setName(std::string name_) { name = name_; }
00078
00079 bool loadData(IDataSource* ids, uint32 version);
00080
00082 static void ConCmd_teleport(const Console::ArgvType &argv);
00084 static void ConCmd_mark(const Console::ArgvType &argv);
00086 static void ConCmd_recall(const Console::ArgvType &argv);
00088 static void ConCmd_listmarks(const Console::ArgvType &argv);
00090 static void ConCmd_name(const Console::ArgvType &argv);
00091
00093 static void ConCmd_maxstats(const Console::ArgvType &argv);
00095 static void ConCmd_heal(const Console::ArgvType &argv);
00097 static void ConCmd_toggleInvincibility(const Console::ArgvType &argv);
00098
00099
00101 static void ConCmd_useBackpack(const Console::ArgvType &argv);
00103 static void ConCmd_useInventory(const Console::ArgvType &argv);
00105 static void ConCmd_useRecall(const Console::ArgvType &argv);
00107 static void ConCmd_useBedroll(const Console::ArgvType &argv);
00109 static void ConCmd_useKeyring(const Console::ArgvType &argv);
00110
00112 static void ConCmd_toggleCombat(const Console::ArgvType &argv);
00113
00114
00115 ENABLE_RUNTIME_CLASSTYPE();
00116
00117 INTRINSIC(I_teleportToEgg);
00118 INTRINSIC(I_accumulateStrength);
00119 INTRINSIC(I_accumulateDexterity);
00120 INTRINSIC(I_accumulateIntelligence);
00121 INTRINSIC(I_clrAvatarInCombat);
00122 INTRINSIC(I_setAvatarInCombat);
00123 INTRINSIC(I_isAvatarInCombat);
00124
00125 void getWeaponOverlay(const WeaponOverlayFrame*& frame, uint32& shape);
00126
00127
00128 protected:
00129 virtual void saveData(ODataSource* ods);
00130
00131 void useInventoryItem(uint32 shapenum);
00132
00133 bool justTeleported;
00134
00135 int accumStr;
00136 int accumDex;
00137 int accumInt;
00138
00139 std::string name;
00140 };
00141
00142 #endif