28 #include <iengine/mesh.h> 29 #include <iengine/sector.h> 30 #include <iutil/vfs.h> 31 #include <csutil/csobject.h> 32 #include <csutil/csstring.h> 33 #include <csutil/hash.h> 34 #include <csutil/weakreferenced.h> 70 class psSpellCastEvent;
86 #define BUFF_INDICATOR "+" 87 #define DEBUFF_INDICATOR "-" 89 #define UNSTICK_TIME 15000 99 scfFakeInterface<psGemServerMeshAttach> >
159 return entities_by_eid;
171 EID FindItemID(
psItem* item);
175 gemObject* FindObject(
const csString &name);
177 gemActor* FindPlayerEntity(PID player_id);
179 gemNPC* FindNPCEntity(PID npc_id);
181 gemNPC* FindNPCEntity(EID eid);
183 gemItem* FindItemEntity(uint32 item_id);
187 void AddEntity(
gemObject* obj, EID objEid);
189 void AddActorEntity(
gemActor* actor);
190 void RemoveActorEntity(
gemActor* actor);
191 void AddItemEntity(
gemItem* item);
192 void RemoveItemEntity(
gemItem* item, uint32 uid);
194 void RemovePlayerFromLootables(PID playerID);
201 void UpdateAllStats();
203 void GetAllEntityPos(csArray<psAllEntityPosMessage> &msgs);
204 int CountManagedNPCs(AccountID superclientID);
205 void FillNPCList(
MsgEntry* msg, AccountID superclientID);
206 void SendAllNPCStats(AccountID superclientID);
207 void ActivateNPCs(AccountID superclientID);
208 void StopAllNPCs(AccountID superclientID);
218 void GetPlayerObjects(PID playerID, csArray<gemObject*> &list);
230 void Teleport(
gemObject*
object,
float x,
float y,
float z,
float rot,
const char* sectorname);
244 void AttachObject(iObject*
object,
gemObject* gobject);
255 void UnattachObject(iObject*
object,
gemObject* gobject);
264 gemObject* FindAttachedObject(iObject*
object);
278 csArray<gemObject*> FindNearbyEntities(iSector* sector,
const csVector3 &pos,
InstanceID instance,
float radius,
bool doInvisible =
false);
288 csArray<gemObject*> FindSectorEntities(iSector* sector,
bool doInvisible =
false);
330 virtual double CalcFunction(
MathEnvironment* env,
const char* functionName,
const double* params);
333 return name.GetData();
340 virtual void Disconnect();
344 return eid.IsValid();
363 void SetAlive(
bool flag,
bool queue =
true);
365 uint32_t GetClientID();
390 void SetName(
const char* n);
394 worldInstance = newInstance;
398 return worldInstance;
403 receivers.Push(receiver);
407 receivers.Delete(receiver);
418 iMeshWrapper* GetMeshWrapper();
431 void Move(
const csVector3 &pos,
float rotangle,iSector* room);
436 bool IsNear(
gemObject* obj,
float radius,
bool ignoreY =
false);
441 const csVector3 &GetPosition();
446 void GetPosition(csVector3 &pos,
float &yrot,iSector* §or);
451 void GetPosition(csVector3 &pos, iSector* §or);
464 iSector* GetSector();
469 virtual float GetVelocity();
476 return GetSector() ? GetSector()->QueryObject()->GetName() :
"(null)";
482 csArray<gemObject*>* GetObjectsInRange(
float range);
500 csArray<PublishDestination> &GetMulticastClients();
509 void UpdateProxList(
bool force =
false);
514 void RemoveFromAllProx();
529 return alwaysWatching;
533 float RangeTo(
gemObject* obj,
bool ignoreY =
false,
bool ignoreInstance =
false);
535 virtual bool IsUpdateReq(csVector3
const &pos,csVector3
const &oldPos);
546 virtual void SendBehaviorMessage(
const csString &str,
gemObject* obj);
547 virtual csString GetDefaultBehavior(
const csString &dfltBehaviors);
565 virtual void Broadcast(
int clientnum,
bool control);
661 const csVector3 &pos,
float rotangle,
int clientnum);
684 bool InitProximityList(
float radius,
int clientnum);
686 void InitMesh(
const char* name,
const csVector3 &pos,
const float rotangle, iSector* room);
698 const char* factname,
701 const csVector3 &pos,
707 return "Active object";
714 virtual void Broadcast(
int clientnum,
bool control);
729 virtual void SendBehaviorMessage(
const csString &str,
gemObject* obj);
730 virtual csString GetDefaultBehavior(
const csString &dfltBehaviors);
783 const char* factname,
786 const csVector3 &pos,
808 return itemType.GetData();
825 virtual double CalcFunction(
MathEnvironment* env,
const char* functionName,
const double* params);
828 virtual float GetBaseAdvertiseRange();
834 virtual void Broadcast(
int clientnum,
bool control);
844 virtual bool Send(
int clientnum,
bool control,
bool to_superclients,
psPersistAllEntities* allEntities=NULL);
856 virtual void SetPosition(
const csVector3 &pos,
float angle, iSector* sector,
InstanceID instance);
865 virtual void SetRotation(
float xrotangle,
float yrotangle,
float zrotangle);
874 virtual void GetRotation(
float &xrotangle,
float &yrotangle,
float &zrotangle);
881 virtual bool IsPickupable();
891 virtual bool IsPickupableWeak();
900 virtual bool IsPickupableStrong();
902 virtual bool IsLockable();
903 virtual bool IsLocked();
904 virtual bool IsConstructible();
905 virtual bool IsSecurityLocked();
906 virtual bool IsContainer();
907 virtual bool IsUsingCD();
909 virtual bool GetCanTransform();
910 virtual bool GetVisibility();
912 virtual void SendBehaviorMessage(
const csString &str,
gemObject* obj);
923 virtual void SendBehaviorMessageTakeAll(
const csString &str,
gemObject* obj,
bool precise);
939 bool AddToContainer(
psItem* item,
Client* fromClient,
int slot,
bool test);
945 const char* factname,
948 const csVector3 &pos,
961 void CleareWithoutDelete();
966 bool CanAdd(
unsigned short amountToAdd,
psItem* item,
int slot, csString &reason);
969 return AddToContainer(item, fromClient, slot,
false);
971 bool RemoveFromContainer(
psItem* item,
Client* fromClient);
994 psItem* RemoveFromContainer(
psItem* itemStack,
int fromSlot,
Client* fromClient,
int stackCount);
996 psItem* FindItemInSlot(
int slot,
int stackCount = -1);
999 return GetItemData()->GetContainerMaxSlots();
1003 return itemlist.GetSize();
1041 return "ActionLocation";
1048 virtual float GetBaseAdvertiseRange();
1049 virtual bool SeesObject(
gemObject*
object,
float range);
1055 virtual void Broadcast(
int clientnum,
bool control);
1065 virtual bool Send(
int clientnum,
bool control,
bool to_superclients,
psPersistAllEntities* allEntities=NULL);
1067 virtual void SendBehaviorMessage(
const csString &str,
gemObject* obj);
1094 return attacker_ref;
1098 return timeOfAttack;
1100 virtual float Damage()
const = 0;
1104 timeOfAttack = csGetTicks();
1119 CS_ASSERT(damage > 0);
1138 CS_ASSERT(hpRate < 0);
1143 csTicks elapsed = csGetTicks() - timeOfAttack;
1144 return -hpRate * csMin(duration, elapsed);
1157 this->actor = actor;
1162 virtual void OnChange();
1179 csVector3
top, bottom, offset;
1233 void GetLogLine(csString &line)
const;
1254 bool InitLinMove(
const csVector3 &pos,
float angle, iSector* sector);
1255 bool InitCharData(
Client* c);
1277 virtual void ApplyStaminaCalculations(
const csVector3 &velocity,
float times);
1280 void SetGMDefaults();
1314 InstanceID myInstance,iSector* room,
const csVector3 &pos,
float rotangle,
int clientnum);
1326 virtual Client* GetClient()
const;
1338 virtual double CalcFunction(
MathEnvironment* env,
const char* functionName,
const double* params);
1341 bool SetupCharData();
1343 void SetTextureParts(
const char* parts);
1344 void SetEquipment(
const char* equip);
1358 return (mount != NULL);
1366 const char* GetModeStr();
1370 return combat_stance;
1372 virtual void SetCombatStance(
const Stance &stance);
1384 CS_ASSERT(attack_cnt);
1397 spellCasting = event;
1401 return spellCasting != NULL;
1405 if(spellCasting) spellCasting->
Interrupt();
1426 return isAllowedToMove;
1428 void SetAllowedToMove(
bool newvalue);
1433 isFrozen.
SetBase(flag ? 1 : 0);
1437 return (isFrozen.
Current() > 0);
1453 bool IsAllowedToAttack(
gemObject* target, csString &msg);
1469 void SetAllowedToDisconnect(
bool allowed);
1471 void SetSecurityLevel(
int level);
1472 void SetMasqueradeLevel(
int level);
1475 return(securityLevel);
1479 return(masqueradeLevel);
1485 last_production_pos = pos;
1489 pos = last_production_pos;
1499 return productionStartPos;
1509 productionStartPos = pos;
1520 bool AddChatReport(
gemActor* reporter);
1528 void RemoveChatReport();
1535 return activeReports > 0;
1545 bool LogChatMessage(
const char* who,
const psChatMessage &msg);
1553 bool LogSystemMessage(
const char* szLine);
1561 bool LogLine(
const char* szLine);
1568 void ProcessStamina();
1569 void ProcessStamina(
const csVector3 &velocity,
bool force=
false);
1571 void Teleport(
const char* sec,
const csVector3 &pos,
float yrot,
InstanceID instance, int32_t loadDelay = 0, csString background =
"", csVector2 point1 = 0, csVector2 point2 = 0, csString widget =
"");
1572 void Teleport(iSector* sector,
const csVector3 &pos,
float yrot,
InstanceID instance, int32_t loadDelay = 0, csString background =
"", csVector2 point1 = 0, csVector2 point2 = 0, csString widget =
"");
1573 void Teleport(iSector* sector,
const csVector3 &pos,
float yrot, int32_t loadDelay = 0, csString background =
"", csVector2 point1 = 0, csVector2 point2 = 0, csString widget =
"");
1575 void SetPosition(
const csVector3 &pos,
float angle, iSector* sector);
1578 void UpdateValidLocation(
const csVector3 &pos,
float yrot, iSector* sector,
InstanceID instance,
bool force =
false);
1581 void MulticastDRUpdate();
1582 virtual void ForcePositionUpdate(int32_t loadDelay = 0, csString background =
"", csVector2 point1 = 0, csVector2 point2 = 0, csString widget =
"");
1588 deathReceivers.Push(receiver);
1592 deathReceivers.Delete(receiver);
1596 float GetRelativeFaction(
gemActor* speaker);
1598 csPtr<PlayerGroup> GetGroup();
1600 bool InGroup()
const;
1601 bool IsGroupedWith(
gemActor* other,
bool IncludePets =
false)
const;
1603 void RemoveFromGroup();
1605 bool IsMyPet(
gemActor* other)
const;
1612 const char* GetGuildName();
1632 void DoDamage(
gemActor* attacker,
float damage);
1633 void AddAttackerHistory(
gemActor* attacker,
float damage);
1634 void AddAttackerHistory(
gemActor* attacker,
float hpRate, csTicks duration);
1635 void RemoveAttackerHistory(
gemActor* attacker);
1647 virtual bool HasBeenAttackedBy(
gemActor* attacker);
1651 DoDamage(attacker, psChar->
GetHP());
1656 virtual bool UpdateDR();
1657 virtual void GetLastSuperclientPos(csVector3 &pos,
InstanceID &instance, csTicks &last)
const;
1658 virtual void SetLastSuperclientPos(
const csVector3 &pos,
InstanceID instance,
const csTicks &now);
1664 virtual void SendTargetStatDR(
Client* client);
1667 virtual void SendGroupStats();
1669 void SetAction(
const char* anim,csTicks &timeDelay);
1671 virtual void Broadcast(
int clientnum,
bool control);
1681 virtual bool Send(
int clientnum,
bool control,
bool to_superclients,
psPersistAllEntities* allEntities=NULL);
1688 virtual void SendGroupMessage(
MsgEntry* me);
1693 gemObject* FindNearbyActorName(
const char* name);
1695 virtual void SendBehaviorMessage(
const csString &str,
gemObject* obj);
1696 virtual csString GetDefaultBehavior(
const csString &dfltBehaviors);
1704 void FallBegan(
const csVector3 &pos, iSector* sector);
1709 float FallEnded(
const csVector3 &pos, iSector* sector);
1721 return fallStartTime;
1733 virtual void SetVisibility(
bool visible);
1734 virtual bool SeesObject(
gemObject*
object,
float range);
1740 virtual void SetInvincibility(
bool invincible);
1747 return viewAllObjects;
1749 void SetViewAllObjects(
bool v);
1751 void StopMoving(
bool worldVel =
false);
1763 bool MoveToSpawnPos(int32_t delay = 0, csString background =
"", csVector2 point1 = 0, csVector2 point2 = 0, csString widget =
"");
1776 bool GetSpawnPos(csVector3 &pos,
float &yrot, iSector* §or,
bool useRange =
false);
1783 bool MoveToValidPos(
bool force =
false);
1785 void GetValidPos(csVector3 &pos,
float &yrot, iSector* §or,
InstanceID &instance);
1790 void GetLastLocation(csVector3 &pos,
float &yrot, iSector* §or,
InstanceID &instance);
1795 void MoveToLastPos();
1798 void SetPrevTeleportLocation(
const csVector3 &pos,
float yrot, iSector* sector,
InstanceID instance);
1800 void GetPrevTeleportLocation(csVector3 &pos,
float &yrot, iSector* §or,
InstanceID &instance);
1804 return dmgHistory.Get(pos);
1808 return dmgHistory.GetSize();
1819 void InvokeNearlyDeadScripts(
gemActor* defender,
psItem* weapon);
1820 void InvokeMovementScripts();
1823 void SendActiveSpells();
1826 int ActiveSpellCount(
const csString &name);
1829 return activeSpells;
1831 void CancelActiveSpellsForDeath();
1832 void CancelActiveSpellsWhichDamage();
1833 int FindAnimIndex(
const char* name);
1844 void SetDefaults(
bool player);
1864 bool SetMesh(
const char* meshname);
1868 return GetCharacterData()->Inventory().GetDoRestrictions();
1872 GetCharacterData()->Inventory().SetDoRestrictions(v);
1878 targetObject = object;
1882 return targetObject;
1888 virtual float GetVelocity();
1895 virtual bool InsideGuardedArea(
gemObject*
object);
1903 return activeMagic_seq;
1955 InstanceID myInstance,iSector* room,
const csVector3 &pos,
float rotangle,
int clientnum);
1959 virtual void SetCombatStance(
const Stance &stance);
1962 default_attackid = id;
1966 return default_attackid;
1980 return superClientID;
1987 void SetupDialog(PID npcID, PID masterNpcID,
bool force=
false);
1993 virtual void AddLootablePlayer(PID playerID);
1994 virtual void RemoveLootablePlayer(PID playerID);
1995 bool IsLootablePlayer(PID playerID);
1998 return lootablePlayers;
2000 virtual Client* GetRandomLootClient(
int range);
2013 void Say(
const char* sayText,
Client* who,
bool sayPublic, csTicks &timeDelay);
2030 void ActionCommand(
bool actionMy,
bool actionNarrate,
const char* actText,
Client* who,
bool actionPublic, csTicks &timeDelay);
2032 void AddBadText(
const char* playerSaid,
const char* trigger);
2033 void GetBadText(
size_t first,
size_t last, csStringArray &saidArray, csStringArray &trigArray);
2043 virtual bool Send(
int clientnum,
bool control,
bool to_superclients,
psPersistAllEntities* allEntities=NULL);
2049 virtual void Broadcast(
int clientnum,
bool control);
2051 virtual void SendBehaviorMessage(
const csString &str,
gemObject* obj);
2052 virtual csString GetDefaultBehavior(
const csString &dfltBehaviors);
2053 void ShowPopupMenu(
Client* client);
2061 return this->target;
2064 virtual void SetOwner(
gemObject* owner);
2071 virtual void SetPosition(
const csVector3 &pos,
float angle, iSector* sector);
2084 return !GetCharacterData()->IsPet();
2087 virtual void SendGroupStats();
2088 virtual void ForcePositionUpdate();
2093 void RegisterSpeaker(
Client* client);
2098 void CheckSpeakers();
2106 void SetBusy(
bool busy);
2114 bool IsBusy()
const;
2127 const csVector3 &pos,
float rotangle,
int clientnum,uint32
id) :
gemNPC(gemsupervisor, cachemanager, entitymanager, chardata,factname,instance,room,pos,rotangle,clientnum)
2129 this->persistanceLevel =
"Temporary";
2140 this->persistanceLevel = level;
2144 return persistanceLevel.GetData();
2148 return this->persistanceLevel.CompareNoCase(
"Permanent");
2152 csString persistanceLevel;
2177 dependency = depends;
2187 if(dependency.IsValid())
2189 dependency->UnregisterCallback(
this);
2198 if(dependency.IsValid())
2200 dependency->UnregisterCallback(
this);
2215 :
psGameEvent(ticks,offsetticks,
"psResurrectEvent")
bool GetViewAllObjects()
Flag to determine of this player can see all objects.
bool nevertired
These flags are for GM/debug abilities.
psLinearMovement * pcmove
uint32_t tribeID
Holds the id of the tribe owning this item (0 if is not tribe-owned)
bool atRest
Is this character stationary or moving?
bool questtester
no quest lockouts
uint8_t movementMode
Actor movement mode from DB table movement_modes.
DRstate newvalid_location
uint8_t attack_cnt
Count of attack events in CS event queue.
bool GetFiniteInventory()
void SetInstance(InstanceID newInstance)
csPDelArray< ProgressionScript > onNearlyDeadScripts
Manages CEL entities on the server.
csTicks nextLongRangeAvail
When can npc respond to long range prox trigger again.
csArray< ActiveSpell * > activeSpells
time_t _time
Info: Time this line was said.
virtual const char * GetObjectType()
gemActor * Attacker() const
csArray< psItem * > itemlist
bool viewAllObjects
can view invisible objects?
ProgressionScript is the imperative script container.
iObjectRegistry * object_reg
The Crystal Space Object Registry.
PSCHARACTER_MODE player_mode
const char * GetFirstName()
void SetAlwaysWatching(bool w)
void GetLastProductionPos(csVector3 &pos)
csTicks nextVeryShortRangeAvail
When can npc respond to very short range prox trigger again.
virtual float Damage() const
#define DEF_PROX_DIST
100m is trial distance here
csArray< iDeleteObjectCallback * > receivers
List of objects which are to be notified when this object is deleted.
virtual bool GetInvincibility()
A specific MathEnvironment to be used in a MathScript.
psWorkGameEvent * GetTradeWork()
Return trade work event so it can be stopped.
A MathScript is a mini-program to run.
const char * GetSectorName()
virtual psActionLocation * GetAction()
bool alwaysWatching
True if this object always watches (proxlists) regardless of owner.
virtual const char * GetObjectType()
csVector3 fallStartPos
the position where the fall began
void ClearDamageHistory()
virtual bool IsLootablePlayer(PID playerID)
virtual void SetLastSuperclientPos(const csVector3 &pos, InstanceID instance, const csTicks &now)
uint32 nextEID
The next ID available for an object.
const char * GetName(int id)
The message sent from server to superclient every 2.5 seconds.
virtual bool Send(int clientnum, bool control, bool to_superclients, psPersistAllEntities *allEntities=NULL)
Send this object to the given client.
void SetTradeWork(psWorkGameEvent *event)
Assign trade work event so it can be accessed.
A special form of buffable that is clamped to always return a positive number.
float prox_distance_desired
What is the maximum range of proxlist we want.
void SetFrozen(bool flag)
Check whether the actor is frozen.
virtual unsigned GetDefaultAttackID()
The structure of 1 queue entry (pointer to a message)
csArray< ActiveSpell * > & GetActiveSpells()
CacheManager * cacheManager
csRef< iEngine > engine
Stored here to save expensive csQueryRegistry calls.
csWeakRef< gemObject > targetObject
Is the current targeted object for this actor.
void Initialize(gemActor *actor)
void SetMount(psCharacter *newMount)
psResurrectEvent(csTicks ticks, int offsetticks, gemActor *actor)
PID pid
Player ID (also known as character ID or PID)
csRef< iFile > logging_chat_file
csRef<iFile> logging_chat_file Info: log file handle.
virtual void SetSuperclientID(AccountID id)
bool isAllowedToMove
Is a movement lockout in effect?
virtual void RemoveLootablePlayer(PID playerID)
Manages character details over the net.
EID eid
Entity ID (unique identifier for object)
virtual Client * GetClient() const
bool IsAlive() const
Returns whether the object is alive.
virtual Client * GetRandomLootClient(int range)
InstanceID worldInstance
Only objects which match instances can see each other.
virtual bool IsContainer()
virtual psNPCDialog * GetNPCDialogPtr()
PSCHARACTER_MODE GetMode()
const csArray< PID > & GetLootablePlayers() const
csWeakRef< Client > clientRef
virtual bool GetVisibility()
psDatabase * database
The main PlaneShift database object.
Defines a level inside a guild.
ProximityList * GetProxList()
virtual unsigned GetDefaultAttackID()
bool invincible
cannot be attacked
bool IsFalling()
Checks if the object is falling.
csWeakRef< gemObject > target
gemPet(GEMSupervisor *gemsupervisor, CacheManager *cachemanager, EntityManager *entitymanager, psCharacter *chardata, const char *factname, InstanceID instance, iSector *room, const csVector3 &pos, float rotangle, int clientnum, uint32 id)
Defines a guild member in a guild.
virtual bool IsPickupable()
csWeakRef< gemActor > attacker_ref
virtual const char * GetObjectType()
void InterruptSpellCasting()
virtual bool IsValid(void)
virtual ~AttackerHistory()
csRef< iMeshFactoryWrapper > nullfact
Null factory for our mesh instances.
Any semi-autonomous object, either a player or an NPC.
virtual void AddLootablePlayer(PID playerID)
virtual psGuildInfo * GetGuild()
static GEMSupervisor * cel
Static ptr back to main collection of all objects.
iDataConnection * db
Global connection to the Database. Set from the psDatabase class.
uint32_t activeMagic_seq
active magic message seq
size_t GetDamageHistoryCount() const
csTicks nextShortRangeAvail
When can npc respond to short range prox trigger again.
Info: Stores a chat history element.
bool instantcast
cast spells instantly
virtual bool IsPickupableWeak()
void RegisterCallback(iDeleteObjectCallback *receiver)
virtual bool HasKillStealProtection()
Returns if the npc has killsteal protection.
unsigned int lastSentSuperclientInstance
bool IsLoggingChat() const
Returns /report file logging status.
gemMesh * pcmesh
link to mesh class
void SetSpellCasting(psSpellCastGameEvent *event)
psItem * GetIndexItem(size_t i)
csPDelArray< DialogCounter > badText
gemObject * GetTargetObject() const
This event actually triggers a spell, after the casting wait time.
virtual void GetLastSuperclientPos(csVector3 &pos, InstanceID &instance, csTicks &last) const
gemContainers are the public containers in the world for crafting, like forges or ovens...
NPCManager * npcmanager
NPC controller.
psGEMEvent(csTicks ticks, int offsetticks, gemObject *depends, const char *newType)
virtual bool IsSecutityLocked()
bool AddToContainer(psItem *item, Client *fromClient, int slot=-1)
static int Compare(DialogCounter *const &first, DialogCounter *const &second)
csWeakRef< gemObject > who
psGuildInfo * GetGuild()
Return the active guild, if any for this character.
void SetFiniteInventory(bool v)
virtual void DeleteObjectCallback(iDeleteNotificationObject *object)
unsigned default_attackid
Default attack type ID.
virtual void SetTarget(gemObject *newTarget)
virtual psCharacter * GetCharacterData()
csTicks lastSentSuperclientTick
virtual gemObject * GetOwner()
virtual const char * GetObjectType()
This class automatically implements timed events which depend on the existence and validity of a gemO...
void SetTribeID(uint32_t id)
virtual void SetVisibility(bool vis)
csVector3 productionStartPos
Production Start Pos is used to record the place where people started digging.
virtual void SendTargetStatDR(Client *client)
psGuildMember * GetGuildMembership()
Gets the psguildmember structure refereed to this actor, if in a guild.
virtual void SetSuperclientID(AccountID id)
csVector3 last_production_pos
This class collects data of a netclient.
Any PS Object with which a player may have interaction (i.e.
psGemServerMeshAttach(gemObject *object)
Setup this helper with the object we want to attach with.
void RegisterCallback(iDeathCallback *receiver)
bool givekillexp
give exp if killed
virtual bool Send(int clientnum, bool control, bool to_superclients, psPersistAllEntities *allEntities=NULL)
Send this object to the given client.
A record in a gemActor's attacker history.
void UnregisterCallback(iDeleteObjectCallback *receiver)
virtual gemObject * GetTarget()
csString _line
Info: Actual text. (Preformated depending on chat type)
bool busy
Indicator from the NPC client to state the if the NPC is busy.
const char * SetPersistanceLevel(void)
csHash< gemObject *, EID > & GetAllGEMS()
Get a hash of all the current entities on the server.
void UnregisterCallback(iDeathCallback *receiver)
csString factname
Name of CS Mesh Factory used to create this object.
virtual gemObject * GetOwner()
virtual psNPCDialog * GetNPCDialogPtr()
virtual bool GetVisibility()
gemObject * GetObject()
Get the gemObject that the mesh has attached.
const Stance & GetCombatStance()
csHash< gemActor *, PID > actors_by_pid
A list of all the actors stored by PID (player/character ID).
bool safefall
no fall damage
void SetLastProductionPos(csVector3 &pos)
virtual float GetBaseAdvertiseRange()
This value indicates the range that this entity would become visible to other entities if no other mo...
This class exists per NPC, and holds all dialog triggers, responses and scripts for this particular N...
virtual const char * GetObjectType()
virtual AccountID GetSuperclientID()
iSector * fallStartSector
the sector where the fall began
virtual bool SeesObject(gemObject *object, float range)
virtual float Damage() const
bool is_alive
Flag indicating whether object is alive or not.
iSector * forcedSector
Needed to force the effect of a psForcePositionMessage since sectors are tied to instances and force ...
void SetProductionStartPos(const csVector3 &pos)
Sets the place where the player started digging.
virtual void SetDefaultAttackID(unsigned)
unsigned int activeReports
unsigned int activeReports Info: Total /report commands filed against this player that are still acti...
virtual bool IsPickupableStrong()
FrozenBuffable & GetBuffableFrozen()
SCF_INTERFACE(psGemServerMeshAttach, 0, 0, 1)
float prox_distance_current
What is the current actual range for proxlists (they adjust when the # of objects gets too high) ...
void Kill(gemActor *attacker)
This class manages the caching of data that is unchanging during server operation.
csWeakRef< gemObject > dependency
virtual bool GetVisibility()
A gemObject is any solid, graphical object visible in PS with normal physics and normal collision det...
int securityLevel
What commands the actor can access. Normally only for a player controlled object. ...
virtual psCharacter * GetCharacterData()
bool infinitemana
infinite mana
FrozenBuffable isFrozen
Whether the actor is frozen or not.
psGuildLevel * GetGuildLevel()
Return the guild level for this character, if any.
csTicks TimeOfAttack() const
This class holds the refs to the core factories, etc in CEL.
This class stores all the properties of an action location Entrance, return location, name, response type, trigger.
csString name
Name of this object, used mostly for debugging.
void SetPersistanceLevel(const char *level)
EntityManager * entityManager
Message sent with chat info.
virtual const char * GetObjectType()
Helper class to attach a PlaneShift gem object to a particular mesh.
An AttackerHistory entry for a regular, one-time damaging attack.
void SetTargetObject(gemObject *object)
void Trigger()
Abstract event processing function.
csTicks GetFallStartTime()
csVector3 lastSentSuperclientPos
virtual void SendGroupMessage(MsgEntry *me)
Distribute this object to all members of a group.
This class is a list of several CLient objects, it's designed for finding clients very fast based on ...
psGuildLevel * GetGuildLevel()
psCharacter * GetMount() const
virtual void BroadcastTargetStatDR(ClientConnectionSet *clients)
uint8_t DRcounter
increments in loop to prevent out of order packet overwrites of better data
bool isFalling
is this object falling down ?
virtual bool IsLockable()
psGuildMember * GetGuildMembership()
Return the guild membership for this character, if any.
AttackerHistory(gemActor *attacker)
virtual void ApplyStaminaCalculations(const csVector3 &velocity, float times)
virtual bool HasKillStealProtection()
Returns if the object has killsteal protection.
csArray< PID > lootablePlayers
Array of client id's allowed to loot this char.
DOTHistory(gemActor *attacker, float hpRate, csTicks duration)
csString matname
Name of base material used by this object.
An AttackerHistory entry for a DOT (damage over time) attack.
All scheduled events must inherit from this class.
virtual const char * ToString()
This is a helper class that defines a mesh on the server.
const char * GetCharName() const
csHash< gemItem *, uint32 > items_by_uid
A list of all the items stored by UID (psItem ID).
bool visible
is visible to clients ?
DamageHistory(gemActor *attacker, float dmg)
This class generically allows objects to be notified when a gemObject is removed. ...
ProximityList * proxlist
Proximity List for this object.
csRef< PlayerGroup > group
DRstate prev_teleport_location
csArray< iDeathCallback * > deathReceivers
List of objects which are to be notified when this actor dies.
uint32_t GetActiveMagicSequence()
Get the activeMagic sequence, updating to the next value;.
virtual void SetDefaultAttackID(unsigned id)
csHash< gemObject *, EID > entities_by_eid
A list of all the entities stored by EID (entity/gem ID).
AttackerHistory * GetDamageHistory(int pos) const
bool valid
Is object fully loaded.
virtual const char * GetObjectType()
csArray< ChatHistoryEntry > chatHistory
csArray<ChatHistoryEntry> chatHistory Info: Chat history for this player. A chat line stays in histor...
virtual bool IsConstructible()
uint8_t forceDRcounter
sequence number for forced position updates
This class generically allows objects to be notified when a gemActor dies.
csWeakRef< gemObject > owner
psSpellCastGameEvent * spellCasting
Hold a pointer to the game event < for the spell currently cast.
virtual AccountID GetSuperclientID()
const csVector3 & GetProductionStartPos(void) const
Returns the place where the player last started digging.
csPDelArray< AttackerHistory > dmgHistory
This class embodies item instances in the game.
Provides a manager to facilitate subscriptions.