本文整理汇总了C++中PhasorCaller类的典型用法代码示例。如果您正苦于以下问题:C++ PhasorCaller类的具体用法?C++ PhasorCaller怎么用?C++ PhasorCaller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PhasorCaller类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnKillMultiplier
void OnKillMultiplier(const halo::s_player& player, DWORD multiplier)
{
PhasorCaller caller;
AddPlayerArg(&player, caller);
caller.AddArg(multiplier);
caller.Call("OnKillMultiplier");
}
示例2: OnBanCheck
/*! \todo make function so scripts can check if hash-checking is on */
bool OnBanCheck(const std::string& hash, const std::string& ip)
{
PhasorCaller caller;
caller.AddArg(hash);
caller.AddArg(ip);
return HandleResult<bool>(caller.Call("OnBanCheck", result_bool), true);
}
示例3: OnWeaponReload
bool OnWeaponReload(const halo::s_player* player, halo::ident weap)
{
PhasorCaller caller;
AddPlayerArg(player, caller);
AddArgIdent(weap, caller);
return HandleResult<bool>(caller.Call("OnWeaponReload", result_bool), true);
}
示例4: OnServerCommand
bool OnServerCommand(const halo::s_player* player, const std::string& command)
{
PhasorCaller caller;
AddPlayerArg(player, caller);
caller.AddArg(command);
return HandleResult<bool>(caller.Call("OnServerCommand", result_bool), true);
}
示例5: OnPlayerSpawnEnd
void OnPlayerSpawnEnd(const halo::s_player& player, halo::ident m_objectId)
{
PhasorCaller caller;
AddPlayerArg(&player, caller);
AddArgIdent(m_objectId, caller);
caller.Call("OnPlayerSpawnEnd");
}
示例6: OnVehicleEject
bool OnVehicleEject(const halo::s_player& player, bool forceEjected)
{
PhasorCaller caller;
AddPlayerArg(&player, caller);
if (forceEjected) caller.ReturnValueIgnored();
return HandleResult<bool>(caller.Call("OnVehicleEject", result_bool), true);
}
示例7: OnTeamDecision
bool OnTeamDecision(DWORD in_team, DWORD& out_team)
{
PhasorCaller caller;
caller.AddArg(in_team);
Result r = caller.Call("OnTeamDecision", result_number);
if (r.size()) out_team = (DWORD)r.ReadNumber(0).GetValue();
return r.size() != 0;
}
示例8: OnObjectInteraction
bool OnObjectInteraction(halo::s_player& player, halo::ident objid,
halo::ident mapid)
{
PhasorCaller caller;
AddPlayerArg(&player, caller);
AddArgIdent(objid, caller);
AddArgIdent(mapid, caller);
return HandleResult<bool>(caller.Call("OnObjectInteraction", result_bool), true);
}
示例9: OnServerCommandAttempt
bool OnServerCommandAttempt(const halo::s_player& player, const std::string& command,
const std::string& password)
{
PhasorCaller caller;
AddPlayerArg(&player, caller);
caller.AddArg(command);
caller.AddArg(password);
return HandleResult<bool>(caller.Call("OnServerCommandAttempt", result_bool), false);
}
示例10: OnPlayerKill
bool OnPlayerKill(const halo::s_player& victim, const halo::s_player* killer,
DWORD mode)
{
PhasorCaller caller;
AddPlayerArg(killer, caller);
AddPlayerArg(&victim, caller);
caller.AddArg(mode);
return HandleResult<bool>(caller.Call("OnPlayerKill", result_bool), true);
}
示例11: OnExpiration
// return true to reset the timer
virtual bool OnExpiration(Timers& timers) override
{
if (!still_valid()) return false;
PhasorCaller caller;
caller.AddArg(GetID());
caller.AddArg(++count);
if (userdata != nullptr) caller.AddArg(userdata->NewCopy());
return HandleResult<bool>(caller.Call(*state, callback.c_str(), result_bool), false);
}
示例12: OnDamageApplication
bool OnDamageApplication(const halo::s_damage_info* dmg, halo::ident receiver,
const halo::s_hit_info* hit, bool backtap)
{
PhasorCaller caller;
AddArgIdent(receiver, caller);
AddArgIdent(dmg->causer, caller);
AddArgIdent(dmg->tag_id, caller);
caller.AddArg(std::string(hit->desc));
caller.AddArg(backtap);
return HandleResult<bool>(caller.Call("OnDamageApplication", result_bool), true);
}
示例13: OnTeamChange
bool OnTeamChange(const halo::s_player& player, bool relevant, DWORD old_team,
DWORD new_team)
{
PhasorCaller caller;
// if we're not going to process return values, let scripts know
if (!relevant) caller.ReturnValueIgnored();
AddPlayerArg(&player, caller);
caller.AddArg(old_team);
caller.AddArg(new_team);
return HandleResult<bool>(caller.Call("OnTeamChange", result_bool), true);
}
示例14: OnWeaponAssignment
bool OnWeaponAssignment(halo::s_player* player, halo::ident owner, DWORD order,
halo::ident weap_id, halo::ident& out)
{
PhasorCaller caller;
AddPlayerArg(player, caller);
AddArgIdent(owner, caller);
caller.AddArg(order);
AddArgIdent(weap_id, caller);
Result r = caller.Call("OnWeaponAssignment", result_number);
if (!r.size()) return false; // no results
out = halo::make_ident((unsigned long)r.ReadNumber(0).GetValue());
return true;
}
示例15: OnDamageLookup
bool OnDamageLookup(halo::s_damage_info* dmg, void* metaData,
halo::ident receiver, halo::damage_script_options& out)
{
odl::setData(&out, dmg, receiver);
PhasorCaller caller;
AddArgIdent(receiver, caller);
AddArgIdent(dmg->causer, caller);
AddArgIdent(dmg->tag_id, caller);
caller.AddArg((DWORD)metaData);
bool b = HandleResult<bool>(caller.Call("OnDamageLookup", result_bool), true);
odl::reset();
return b;
}