本文整理汇总了C++中UI64LIT函数的典型用法代码示例。如果您正苦于以下问题:C++ UI64LIT函数的具体用法?C++ UI64LIT怎么用?C++ UI64LIT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UI64LIT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TC_LOG_DEBUG
void WorldSession::HandleGuildDeclineInvitation(WorldPackets::Guild::GuildDeclineInvitation& /*decline*/)
{
TC_LOG_DEBUG("guild", "CMSG_GUILD_DECLINE_INVITATION [%s]", GetPlayerInfo().c_str());
GetPlayer()->SetGuildIdInvited(UI64LIT(0));
GetPlayer()->SetInGuild(UI64LIT(0));
}
示例2: m_stationery
MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery(stationery)
{
switch (sender->GetTypeId())
{
case TYPEID_UNIT:
m_messageType = MAIL_CREATURE;
m_senderId = uint64(sender->GetEntry());
break;
case TYPEID_GAMEOBJECT:
m_messageType = MAIL_GAMEOBJECT;
m_senderId = uint64(sender->GetEntry());
break;
/*case TYPEID_ITEM:
m_messageType = MAIL_ITEM;
m_senderId = sender->GetEntry();
break;*/
case TYPEID_PLAYER:
m_messageType = MAIL_NORMAL;
m_senderId = sender->GetGUID().GetCounter();
break;
default:
m_messageType = MAIL_NORMAL;
m_senderId = UI64LIT(0); // will show mail from not existed player
TC_LOG_ERROR("misc", "MailSender::MailSender - Mail have unexpected sender typeid (%u)", sender->GetTypeId());
break;
}
}
示例3: HandleProcTriggerSpell
bool WarriorSpellHandler::HandleProcTriggerSpell(Unit *u, const SpellEntry* auraSpellInfo, uint32 &trig_sp_id, int32* basepoints)
{
// Deep Wounds (replace triggered spells to directly apply DoT), dot spell have finilyflags
if (auraSpellInfo->SpellFamilyFlags == UI64LIT(0x0) && auraSpellInfo->SpellIconID == 243)
{
float weaponDamage;
// DW should benefit of attack power, damage percent mods etc.
// TODO: check if using offhand damage is correct and if it should be divided by 2
if (u->haveOffhandWeapon() && u->getAttackTimer(BASE_ATTACK) > u->getAttackTimer(OFF_ATTACK))
weaponDamage = (u->GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE) + u->GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE))/2;
else
weaponDamage = (u->GetFloatValue(UNIT_FIELD_MINDAMAGE) + u->GetFloatValue(UNIT_FIELD_MAXDAMAGE))/2;
switch (auraSpellInfo->Id)
{
case 12834: basepoints[0] = int32(weaponDamage * 16 / 100); break;
case 12849: basepoints[0] = int32(weaponDamage * 32 / 100); break;
case 12867: basepoints[0] = int32(weaponDamage * 48 / 100); break;
// Impossible case
default:
sLog.outError("Unit::HandleProcTriggerSpell: DW unknown spell rank %u",auraSpellInfo->Id);
return false;
}
// 1 tick/sec * 6 sec = 6 ticks
basepoints[0] /= 6;
trig_sp_id = 12721;
}
return true;
}
示例4: TC_LOG_ERROR
bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
{
/// @Prevent adding passengers when vehicle is uninstalling. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
if (_status == STATUS_UNINSTALLING)
{
TC_LOG_ERROR("entities.vehicle", "Passenger %s, Entry: %u, attempting to board %s, Entry: %u during uninstall! SeatId: %d",
unit->GetGUID().ToString().c_str(), unit->GetEntry(), _me->GetGUID().ToString().c_str(), _me->GetEntry(), (int32)seatId);
return false;
}
TC_LOG_DEBUG("entities.vehicle", "Unit %s scheduling enter vehicle (entry: %u, vehicleId: %u, %s (dbguid: " UI64FMTD ") on seat %d",
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->ID, _me->GetGUID().ToString().c_str(),
uint64(_me->GetTypeId() == TYPEID_UNIT ? _me->ToCreature()->GetSpawnId() : UI64LIT(0)), (int32)seatId);
// The seat selection code may kick other passengers off the vehicle.
// While the validity of the following may be arguable, it is possible that when such a passenger
// exits the vehicle will dismiss. That's why the actual adding the passenger to the vehicle is scheduled
// asynchronously, so it can be cancelled easily in case the vehicle is uninstalled meanwhile.
SeatMap::iterator seat;
VehicleJoinEvent* e = new VehicleJoinEvent(this, unit);
unit->m_Events.AddEvent(e, unit->m_Events.CalculateTime(0));
if (seatId < 0) // no specific seat requirement
{
for (seat = Seats.begin(); seat != Seats.end(); ++seat)
if (seat->second.IsEmpty() && (seat->second.SeatInfo->CanEnterOrExit() || seat->second.SeatInfo->IsUsableByOverride()))
break;
if (seat == Seats.end()) // no available seat
{
e->to_Abort = true;
return false;
}
e->Seat = seat;
_pendingJoinEvents.push_back(e);
}
else
{
seat = Seats.find(seatId);
if (seat == Seats.end())
{
e->to_Abort = true;
return false;
}
e->Seat = seat;
_pendingJoinEvents.push_back(e);
if (!seat->second.IsEmpty())
{
Unit* passenger = ObjectAccessor::GetUnit(*GetBase(), seat->second.Passenger.Guid);
ASSERT(passenger);
passenger->ExitVehicle();
}
ASSERT(seat->second.IsEmpty());
}
return true;
}
示例5: switch
bool Totem::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index, bool castOnSelf) const
{
// Check for Mana Spring & Healing Stream totems
switch (spellInfo->SpellFamilyName)
{
case SPELLFAMILY_SHAMAN:
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x00000002000)) ||
spellInfo->IsFitToFamilyMask(UI64LIT(0x00000004000)))
return false;
break;
default:
break;
}
switch (spellInfo->Effect[index])
{
case SPELL_EFFECT_ATTACK_ME:
// immune to any type of regeneration effects hp/mana etc.
case SPELL_EFFECT_HEAL:
case SPELL_EFFECT_HEAL_MAX_HEALTH:
case SPELL_EFFECT_HEAL_MECHANICAL:
case SPELL_EFFECT_HEAL_PCT:
case SPELL_EFFECT_ENERGIZE:
case SPELL_EFFECT_ENERGIZE_PCT:
return true;
default:
break;
}
if (!IsPositiveSpell(spellInfo))
{
// immune to all negative auras
if (IsAuraApplyEffect(spellInfo, index))
return true;
}
else
{
// immune to any type of regeneration auras hp/mana etc.
if (IsPeriodicRegenerateEffect(spellInfo, index))
return true;
}
return Creature::IsImmuneToSpellEffect(spellInfo, index, castOnSelf);
}
示例6: _L
CESipItcTerminateDialogRefresh1Step::CESipItcTerminateDialogRefresh1Step()
/** Each test step initialises it's own name
*/
{
// store the name of this test case
// this is the name that is used by the script file
//DEF iTestStepName = _L("CESipItcTerminateDialogRefresh1Step");
//The server name and IPC number is obtained and all messages are checked Sync
SR_ServerName = _L("SipServer");
SR_MESSAGE_TYPE = 2;
SR_MESSAGE_ID = 2;
SR_MESSAGE_MASK = UI64LIT(2147483648);
//The iServer_Panic is a unique name from Server,but always truncated to KMaxExitCategoryName
iServer_Panic = _L("SipCSServer");
TCapability cap[] = {ECapability_None, ECapability_Limit};
TSecurityInfo info;
info.Set(RProcess());
TBool result = EFalse;
for (TInt i = 0; cap[i] != ECapability_Limit; i++)
{
if (!(info.iCaps.HasCapability(cap[i])))
{
result=ETrue;
}
}
iExpect_Rejection = result;
iStepCap = UI64LIT(2147483648);
//Get a unique thread name
ChildThread_SR.Format(_L("ChildThread_%S_%d"),&SR_ServerName,SR_MESSAGE_ID);
}
示例7: CreateTransport
void TransportMgr::CreateInstanceTransports(Map* map)
{
TransportInstanceMap::const_iterator mapTransports = _instanceTransports.find(map->GetId());
// no transports here
if (mapTransports == _instanceTransports.end() || mapTransports->second.empty())
return;
// create transports
for (std::set<uint32>::const_iterator itr = mapTransports->second.begin(); itr != mapTransports->second.end(); ++itr)
CreateTransport(*itr, UI64LIT(0), map);
}
示例8: uint32
uint32 WorldTimer::getMSTime_internal()
{
// get current time
const ACE_Time_Value currTime = ACE_OS::gettimeofday();
// calculate time diff between two world ticks
// special case: curr_time < old_time - we suppose that our time has not ticked at all
// this should be constant value otherwise it is possible that our time can start ticking backwards until next world tick!!!
uint64 diff = 0;
(currTime - g_SystemTickTime).msec(diff);
// lets calculate current world time
uint32 iRes = uint32(diff % UI64LIT(0x00000000FFFFFFFF));
return iRes;
}
示例9: SpellHit
void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override
{
if (pSpell->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x080000000))
{
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
m_creature->CastSpell(m_creature, SPELL_STUNNED, true);
m_casterGuid = pCaster->GetObjectGuid();
m_uiSayThanksTimer = 5000;
}
}
示例10: switch
bool Totem::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
{
switch (spellInfo->SpellFamilyName)
{
//Check for Shaman Mana Spring & Healing Stream totems
//They have periodic regenerate effect, but function close before it get
//that check. This check - better way to fix this problem.
case SPELLFAMILY_SHAMAN:
if ( spellInfo->IsFitToFamilyMask(UI64LIT(0x000260CE000)))
return false;
break;
default:
break;
}
switch (spellInfo->Effect[index])
{
case SPELL_EFFECT_ATTACK_ME:
// immune to any type of regeneration effects hp/mana etc.
case SPELL_EFFECT_HEAL:
case SPELL_EFFECT_HEAL_MAX_HEALTH:
case SPELL_EFFECT_HEAL_MECHANICAL:
case SPELL_EFFECT_HEAL_PCT:
case SPELL_EFFECT_ENERGIZE:
case SPELL_EFFECT_ENERGIZE_PCT:
return true;
default:
break;
}
if (!IsPositiveSpell(spellInfo))
{
// immune to all negative auras
if (IsAuraApplyEffect(spellInfo, index))
return true;
}
else
{
// immune to any type of regeneration auras hp/mana etc.
if (IsPeriodicRegenerateEffect(spellInfo, index))
return true;
}
return Creature::IsImmuneToSpellEffect(spellInfo, index);
}
示例11: uint32
uint32 WorldTimer::getMSTime_internal(bool savetime /*= false*/)
{
// get current time
//const ACE_Time_Value currTime = ACE_OS::gettimeofday();
const boost::posix_time::ptime currTime = boost::posix_time::microsec_clock::universal_time();
// calculate time diff between two world ticks
// special case: curr_time < old_time - we suppose that our time has not ticked at all
// this should be constant value otherwise it is possible that our time can start ticking backwards until next world tick!!!
//uint64 diff = 0;
//(currTime - g_SystemTickTime).msec(diff);
uint64 diff = 0;
boost::posix_time::millisec_posix_time_system_config::time_duration_type time_elapse;
time_elapse = currTime - g_SystemTickTime;
diff = time_elapse.total_microseconds();
// lets calculate current world time
uint32 iRes = uint32(diff % UI64LIT(0x00000000FFFFFFFF));
return iRes;
}
示例12: HandleAuraDummyWithApply
void WarriorSpellHandler::HandleAuraDummyWithApply(Aura* aura,Unit* caster,Unit* target)
{
SpellEntry const* m_spellProto = aura->GetSpellProto();
Unit* m_target = target;
// Overpower
if(m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004))
{
// Must be casting target
if (!m_target->IsNonMeleeSpellCasted(false))
return;
Unit* caster = aura->GetCaster();
if (!caster)
return;
Unit::AuraList const& modifierAuras = caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
for(Unit::AuraList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr)
{
// Unrelenting Assault
if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->SpellIconID == 2775)
{
switch ((*itr)->GetSpellProto()->Id)
{
case 46859: // Unrelenting Assault, rank 1
m_target->CastSpell(m_target,64849,true,NULL,(*itr));
break;
case 46860: // Unrelenting Assault, rank 2
m_target->CastSpell(m_target,64850,true,NULL,(*itr));
break;
default:
break;
}
break;
}
}
return;
}
}
示例13: SpellHit
void SpellHit(Unit* pCaster, const SpellEntry* pSpell) override
{
#if defined (CLASSIC) || defined (TBC)
if (pSpell->Id == 28880)
#endif
#if defined (WOTLK)
if (pSpell->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x080000000))
#endif
{
#if defined (CLASSIC) || defined (TBC)
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP);
#endif
#if defined (WOTLK)
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
#endif
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
m_creature->CastSpell(m_creature, SPELL_STUNNED, true);
m_casterGuid = pCaster->GetObjectGuid();
m_uiSayThanksTimer = 5000;
}
}
示例14: int32
void PaladinSpellHandler::HandleSchoolDmg(Spell *spell,int32 &damage,SpellEffectIndex i)
{
const SpellEntry* m_spellInfo = spell->m_spellInfo;
Unit* m_caster = spell->GetCaster();
Unit* unitTarget = spell->getUnitTarget();
// Judgement of Righteousness - receive benefit from Spell Damage and Attack power
if (m_spellInfo->Id == SPELL_JUDGEMENT_OF_RIGHTEOUSNESS)
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
damage += int32(ap * 0.2f) + int32(holy * 32 / 100);
}
// Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target
else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
{
uint32 debuf_id;
switch(m_spellInfo->Id)
{
case 53733: debuf_id = 53742; break;// Judgement of Corruption -> Blood Corruption
case 31804: debuf_id = 31803; break;// Judgement of Vengeance -> Holy Vengeance
default: return;
}
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
damage+=int32(ap * 0.14f) + int32(holy * 22 / 100);
// Get stack of Holy Vengeance on the target added by caster
uint32 stacks = 0;
Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
{
if( ((*itr)->GetId() == debuf_id) && (*itr)->GetCasterGUID()==m_caster->GetGUID())
{
stacks = (*itr)->GetStackAmount();
break;
}
}
// + 10% for each application of Holy Vengeance on the target
if(stacks)
damage += damage * stacks * 10 /100;
}
// Avenger's Shield ($m1+0.07*$SPH+0.07*$AP) - ranged sdb for future
else if (m_spellInfo->SpellFamilyFlags & FLAG_AVENGER_SHIELD)
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
damage += int32(ap * 0.07f) + int32(holy * 7 / 100);
}
// Hammer of Wrath ($m1+0.15*$SPH+0.15*$AP) - ranged type sdb future fix
else if (m_spellInfo->SpellFamilyFlags & FLAG_HAMMER_OF_WRATH)
{
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
damage += int32(ap * 0.15f) + int32(holy * 15 / 100);
}
// Hammer of the Righteous
else if (m_spellInfo->SpellFamilyFlags & FLAG_HAMMER_OF_THE_RIGHTEOUS)
{
// Add main hand dps * effect[2] amount
float average = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
int32 count = m_caster->CalculateSpellDamage(m_spellInfo, 2, m_spellInfo->EffectBasePoints[2], unitTarget);
damage += count * int32(average * IN_MILLISECONDS) / m_caster->GetAttackTime(BASE_ATTACK);
}
// Shield of Righteousness
else if (m_spellInfo->SpellFamilyFlags & FLAG_SHIELD_OF_RIGHTEOUSNESS)
{
damage+=int32(m_caster->GetShieldBlockValue());
}
// Judgement
else if (m_spellInfo->Id == SPELL_JUDGEMENT)
{
// [1 + 0.25 * SPH + 0.16 * AP]
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
damage += int32(ap * 0.16f) + int32(holy * 25 / 100);
}
}
示例15: IsImmuneToSpellEffect
bool Totem::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index, bool castOnSelf) const
{
// Totem may affected by some specific spells
// Mana Spring, Healing stream, Mana tide
// Flags : 0x00000002000 | 0x00000004000 | 0x00004000000 -> 0x00004006000
if (spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && spellInfo->IsFitToFamilyMask(UI64LIT(0x00004006000)))
return false;
switch (spellInfo->Effect[index])
{
case SPELL_EFFECT_ATTACK_ME:
// immune to any type of regeneration effects hp/mana etc.
case SPELL_EFFECT_HEAL:
case SPELL_EFFECT_HEAL_MAX_HEALTH:
case SPELL_EFFECT_HEAL_MECHANICAL:
case SPELL_EFFECT_ENERGIZE:
return true;
default:
break;
}
if (!IsPositiveSpell(spellInfo))
{
// immune to all negative auras
if (IsAuraApplyEffect(spellInfo, index))
{ return true; }
}
else
{
// immune to any type of regeneration auras hp/mana etc.
if (IsPeriodicRegenerateEffect(spellInfo, index))
{ return true; }
}
return Creature::IsImmuneToSpellEffect(spellInfo, index, castOnSelf);
}