25 #include <csutil/ref.h> 26 #include <csutil/csstring.h> 27 #include <csutil/weakreferenced.h> 50 FloodBuffRow(uint8_t chtType, csString txt, csString rcpt,
unsigned int newticks);
68 virtual void OnChange();
115 void SetAllowedToDisconnect(
bool allowed);
122 bool AllowDisconnect();
126 bool ZombieAllowDisconnect();
131 mute.SetBase(flag ? 1 : 0);
135 return (mute.Current() > 0);
149 void SetName(
const char* n);
168 void SetFamiliar(
gemActor* familiar);
173 void RemovePet(
size_t index);
178 bool IsMyPet(
gemActor* other)
const;
181 bool IsAlive()
const;
184 bool ValidateDistanceToTarget(
float range);
187 void SetTargetObject(
gemObject*
object,
bool updateClientGUI=
false);
204 int GetTargetClientID();
243 return securityLevel;
275 static void GetTargetTypeName(int32_t targetType, csString &targetDesc);
297 return (!superclient);
303 void GetIPAddress(
char* addrStr,
socklen_t size);
304 csString GetIPAddress();
306 csString GetIPRange(
int octets=3);
308 static csString GetIPRange(
const char* ipaddr,
int octets=3);
322 unsigned int GetAccountTotalOnlineTime();
324 void AddDuelClient(uint32_t clientnum);
325 void RemoveDuelClient(
Client* client);
326 void ClearAllDuelClients();
327 int GetDuelClientCount();
328 int GetDuelClient(
int id);
329 bool IsDuelClient(uint32_t clientnum);
330 void AnnounceToDuelClients(
gemActor* attacker,
const char* event);
333 void FloodControl(uint8_t
chatType,
const csString &newMessage,
const csString &
recipient);
345 return advisorPoints;
357 void SetAdvisorBan(
bool ban);
358 bool IsAdvisorBanned();
366 return lastInviteTime;
370 lastInviteTime = time;
374 return lastInviteResult;
378 lastInviteResult = result;
382 return hasBeenWarned;
386 hasBeenWarned =
true;
390 return hasBeenPenalized;
394 hasBeenPenalized = value;
406 if(spamPoints<4) spamPoints++;
410 if(spamPoints>0) spamPoints--;
416 waypointPathName = path;
417 waypointPathIndex = index;
421 return waypointPathName;
425 return waypointPathIndex;
429 return waypointPathIndex++;
441 void PathSetIsDisplaying(iSector* sector);
442 void PathClearDisplaying();
443 csList<iSector*>::Iterator GetPathDisplaying();
444 bool PathIsDisplaying();
447 void WaypointSetIsDisplaying(iSector* sector);
448 void WaypointClearDisplaying();
449 csList<iSector*>::Iterator GetWaypointDisplaying();
450 bool WaypointIsDisplaying();
454 void LocationSetIsDisplaying(iSector* sector);
455 void LocationClearDisplaying();
456 csList<iSector*>::Iterator GetLocationDisplaying();
457 bool LocationIsDisplaying();
461 selectedLocationID = id;
465 return selectedLocationID;
472 if(detectedCheatCount < 10000) detectedCheatCount++;
476 return detectedCheatCount;
482 return (cheatMask & mask) != 0;
497 isBuddyListHiding = hide;
501 return isBuddyListHiding;
548 static const int floodWarn = 3;
549 static const int floodMax = 5;
550 static const unsigned int floodForgiveTime = 10000;
557 void SaveAccountData();
580 unsigned int detectedCheatCount;
586 bool isBuddyListHiding;
void CountDetectedCheat()
Give a warning to the client silently. Capped at 10000.
This class holds data for a connection.
int exchangeID
Currently active id of Exchange object managed by Exchange Manager, or 0 if no exchange is active...
gemActor * actor
Pointer to the gemActor object played by this client once a character is logged in and in-game...
int WaypointGetPathIndex()
int nextFloodHistoryIndex
PID GetPID()
The player number for this client.
bool IsZombie()
A zombie client is a client that is prevented from disconnecting because of combat, spellcasting, or defeted.
csTicks accumulatedLag
For cheat detection.
const SOCKADDR_IN & GetAddress() const
csList< iSector * > pathDisplaySectors
const char * GetName(int id)
void SetBuddyListHide(bool hide)
Change whether hiding from buddylists.
uint32_t GetClientNum() const
A special form of buffable that is clamped to always return a positive number.
void PathSetPath(psPath *path)
void SetAdvisorPoints(int p)
void SetSpamPoints(int points)
MuteBuffable mute
mute flag
NetBase::Connection * GetConnection() const
void SetMesh(csString nextMesh)
csTicks GetLastInviteTime()
bool zombie
A zombie client is a client where the player has disconnected, but still active due to not finished c...
void SetReady(bool rdy)
Sets the player state to ready. For example ready to receive chat messages.
void SetSuperClient(bool flag)
Allow distinguishing superclients from regular player clients.
csRef< NetPacketQueueRefCount > outqueue
void SetLastInviteTime(csTicks time)
Any semi-autonomous object, either a player or an NPC.
csArray< uint32_t > duel_clients
void SetSecurityLevel(int level)
void Initialize(Client *c)
int WaypointGetNewPathIndex()
void SetLastInviteResult(bool result)
void SetSelectedLocationID(int id)
csString waypointPathName
int GetSelectedLocationID()
void SetPenalized(bool value)
csList< iSector * > waypointDisplaySectors
Sectors where client is doing online editing.
This class collects data of a netclient.
void void Initialize(iObjectRegistry *object_reg)
csHash< OrderedMessageChannel * > orderedMessages
This collection stores queues of ordered messages while we're waiting for an out of order one to arri...
unsigned int GetDetectedCheatCount()
int GetSecurityLevel() const
The security level of this player.
csArray< gemNPC * > listeningNpc
void SetAdvisor(bool advisor)
Set this client's advisor status.
void SetAccountID(AccountID id)
This class holds the structure for guaranteed inbound ordering of certain message types...
void IncrementAdvisorPoints(int n=1)
A gemObject is any solid, graphical object visible in PS with normal physics and normal collision det...
void DecrementSpamPoints()
bool GetLastInviteResult()
bool isAdvisor
Store if this client is acting as an advisor.
bool GetCheatMask(CheatFlags mask)
csTicks lastInventorySend
AccountID GetAccountID()
The account number for this client.
void SetExchangeID(int ID)
bool allowedToDisconnect
Server set this flag when the player isn't casting spells, fighting or doing anythinge else that shou...
void IncrementSpamPoints()
csString & WaypointGetPathName()
void WaypointSetPath(csString &path, int index)
Online edit of paths.
gemActor * GetActor() const
MuteBuffable & GetBuffableMute()
csList< iSector * > locationDisplaySectors
void SetMute(bool flag)
SetMute is the function that toggles the muted flag.