Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Common.h File Reference
#include "Define.h"
#include "Dynamic/UnorderedMap.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <errno.h>
#include <signal.h>
#include <assert.h>
#include <set>
#include <list>
#include <string>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>
#include "Threading/LockedQueue.h"
#include "Threading/Threading.h"
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <netdb.h>
#include <float.h>
Include dependency graph for Common.h:

Go to the source code of this file.

Classes

struct  LocalizedString

Macros

#define atoll   _atoi64
#define DEFAULT_LOCALE   LOCALE_enUS
#define finite(X)
#define I32FMT   "%08I32X"
#define I64FMT   "%016I64X"
#define llabs   _abs64
#define M_PI   3.14159265358979323846f
#define MAX_ACCOUNT_TUTORIAL_VALUES   8
#define MAX_LOCALES   11
#define MAX_QUERY_LEN   32*1024
#define STRCASECMP   strcasecmp
#define STRINGIZE(a)
#define vsnprintf   _vsnprintf

Typedefs

typedef std::vector< std::string > StringVector

Enumerations

enum class  AccountTypes {
  SEC_PLAYER = 0 , SEC_MODERATOR = 1 , SEC_GAMEMASTER = 2 , SEC_ADMINISTRATOR = 3 ,
  SEC_CONSOLE = 4
}
enum  LocaleConstant {
  LOCALE_enUS = 0 , LOCALE_koKR = 1 , LOCALE_frFR = 2 , LOCALE_deDE = 3 ,
  LOCALE_zhCN = 4 , LOCALE_zhTW = 5 , LOCALE_esES = 6 , LOCALE_esMX = 7 ,
  LOCALE_ruRU = 8 , LOCALE_itIT = 9 , LOCALE_ptBR = 10 , LOCALE_ptPT = 11
}
enum  TimeConstants {
  MINUTE = 60 , HOUR = MINUTE * 60 , DAY = HOUR * 24 , WEEK = DAY * 7 ,
  MONTH = DAY * 30 , YEAR = MONTH * 12 , IN_MILLISECONDS = 1000
}

Functions

float finiteAlways (float f)
LocaleConstant GetLocaleByName (const std::string &name)

Variables

char const * localeNames [TOTAL_LOCALES]
const uint8 TOTAL_LOCALES = 12

Macro Definition Documentation

◆ atoll

#define atoll   _atoi64

Definition at line 99 of file Common.h.

◆ DEFAULT_LOCALE

◆ finite

#define finite ( X)
Value:
_finite(X)

Definition at line 101 of file Common.h.

Referenced by finiteAlways(), Skyfire::IsValidMapCoord(), Skyfire::IsValidMapCoord(), and Skyfire::IsValidMapCoord().

◆ I32FMT

#define I32FMT   "%08I32X"

Definition at line 97 of file Common.h.

◆ I64FMT

#define I64FMT   "%016I64X"

Definition at line 98 of file Common.h.

◆ llabs

#define llabs   _abs64

Definition at line 102 of file Common.h.

Referenced by WorldSocket::HandleAuthSession().

◆ M_PI

#define M_PI   3.14159265358979323846f

Definition at line 192 of file Common.h.

Referenced by FleeingMovementGenerator< T >::_getPoint(), RandomMovementGenerator< T >::_setRandomLocation(), SpellImplicitTargetInfo::CalcDirectionAngle(), WorldObject::CanDetectStealthOf(), ObjectPosSelector::CheckAngle(), Spell::CheckCast(), spell_warr_retaliation::spell_warr_retaliation_AuraScript::CheckProc(), Spell::CheckRange(), boss_viscidus::boss_viscidusAI::DamageTaken(), Unit::DealMeleeDamage(), npc_announcer_toc5::npc_announcer_toc5AI::DoSummonGrandChampion(), boss_malygos::boss_malygosAI::FillCirclePath(), npc_caster_hover_disk::npc_caster_hover_diskAI::FillCirclePath(), npc_ominous_cloud::npc_ominous_cloudAI::FillCirclePath(), Position::GetAngle(), Unit::GetFollowAngle(), Unit::GetRandomContactPoint(), WorldObject::GetRandomNearPosition(), WorldObject::GetRandomPoint(), GetRandPosFromCenterInDist(), LuaGameObject::GetRelativePoint(), Position::GetSinCos(), spell_monk_chi_torpedo::spell_monk_chi_torpedo_SpellScript::HandleAfterCast(), WorldSession::HandleAreaTriggerOpcode(), spell_item_unusual_compass::spell_item_unusual_compass_SpellScript::HandleDummy(), spell_ulduar_squeezed_lifeless::spell_ulduar_squeezed_lifeless_SpellScript::HandleInstaKill(), npc_commandscript::HandleNpcAddFormationCommand(), npc_commandscript::HandleNpcTameCommand(), Position::HasInArc(), Position::HasInLine(), molten_flame::molten_flameAI::InitializeAI(), WorldObject::isInBack(), Unit::isInBackInMap(), Unit::isSpellBlocked(), npc_meteor_strike_initial::npc_meteor_strike_initialAI::IsSummonedBy(), Unit::JumpTo(), npc_transient::npc_transientAI::JustDied(), boss_sara::boss_saraAI::JustSummoned(), spell_alysrazor_turn_monstrosity::spell_alysrazor_turn_monstrosity_SpellScript::KnockBarrage(), CreatureGroup::LeaderMoveTo(), FormationMgr::LoadCreatureFormations(), Unit::MagicSpellHitResult(), Unit::MeleeSpellHitResult(), spell_q12308_escape_from_silverbrook_summon_worgen::spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript::ModDest(), boss_leotheras_the_blind::boss_leotheras_the_blindAI::MoveInLineOfSight(), MotionMaster::MoveKnockbackFrom(), boss_sindragosa::boss_sindragosaAI::MovementInform(), ObjectPosSelector::NextSmallStepAngle(), Position::NormalizeOrientation(), AreaTrigger_at_darkspear_isle::OnTrigger(), LunaticGazeTargetSelector::operator()(), SmartScript::ProcessAction(), SmartScript::ProcessEvent(), Player::ReadMovementInfo(), npc_lake_frog::npc_lake_frogAI::ReceiveEmote(), Position::RelocateOffset(), npc_firework::npc_fireworkAI::Reset(), Unit::RollMeleeOutcomeAgainst(), Spell::SearchChainTargets(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitConeTargets(), spell_omega_stance_spider_effect::spell_omega_stance_spider_effect_SpellScript::SetDestPosition(), boss_malchezaar::boss_malchezaarAI::SummonInfernal(), go_wind_stone::SummonNPC(), boss_warp_splinter::boss_warp_splinterAI::SummonTreants(), Player::Update(), RotateMovementGenerator::Update(), boss_ancient_stone_keeper::boss_ancient_stone_keeperAI::UpdateAI(), boss_devourer_of_souls::boss_devourer_of_soulsAI::UpdateAI(), boss_eye_of_cthun::eye_of_cthunAI::UpdateAI(), boss_nightbane::boss_nightbaneAI::UpdateAI(), boss_romulo::boss_romuloAI::UpdateAI(), boss_the_lurker_below::boss_the_lurker_belowAI::UpdateAI(), npc_master_shang_xi_wood_of_staves::npc_master_shang_xi_wood_of_stavesAI::UpdateAI(), npc_shield_orb::npc_shield_orbAI::UpdateAI(), npc_shu_pool_of_reflection::npc_shu_pool_of_reflectionAI::UpdateAI(), PetAI::UpdateAI(), and GameObject::Use().

◆ MAX_ACCOUNT_TUTORIAL_VALUES

◆ MAX_LOCALES

◆ MAX_QUERY_LEN

◆ STRCASECMP

#define STRCASECMP   strcasecmp
Todo
this thingy looks like hack, but its not, need to

Definition at line 64 of file Common.h.

◆ STRINGIZE

#define STRINGIZE ( a)
Value:
#a

Definition at line 115 of file Common.h.

◆ vsnprintf

Typedef Documentation

◆ StringVector

typedef std::vector<std::string> StringVector

Definition at line 163 of file Common.h.

Enumeration Type Documentation

◆ AccountTypes

enum class AccountTypes
strong
Enumerator
SEC_PLAYER 
SEC_MODERATOR 
SEC_GAMEMASTER 
SEC_ADMINISTRATOR 
SEC_CONSOLE 

Definition at line 128 of file Common.h.

◆ LocaleConstant

Enumerator
LOCALE_enUS 
LOCALE_koKR 
LOCALE_frFR 
LOCALE_deDE 
LOCALE_zhCN 
LOCALE_zhTW 
LOCALE_esES 
LOCALE_esMX 
LOCALE_ruRU 
LOCALE_itIT 
LOCALE_ptBR 
LOCALE_ptPT 

Definition at line 137 of file Common.h.

◆ TimeConstants

Enumerator
MINUTE 
HOUR 
DAY 
WEEK 
MONTH 
YEAR 
IN_MILLISECONDS 

Definition at line 117 of file Common.h.

Function Documentation

◆ finiteAlways()

float finiteAlways ( float f)
inline

Definition at line 113 of file Common.h.

References finite.

Referenced by Player::SaveToDB().

◆ GetLocaleByName()

LocaleConstant GetLocaleByName ( const std::string & name)

Variable Documentation

◆ localeNames

◆ TOTAL_LOCALES