本文整理汇总了C++中Spell::SendChannelUpdate方法的典型用法代码示例。如果您正苦于以下问题:C++ Spell::SendChannelUpdate方法的具体用法?C++ Spell::SendChannelUpdate怎么用?C++ Spell::SendChannelUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spell
的用法示例。
在下文中一共展示了Spell::SendChannelUpdate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndFishing
void GameObject::EndFishing(Player* player, bool abort )
{
Spell * spell = player->GetCurrentSpell();
if(spell)
{
if(abort) // abort becouse of a reason
{
//FIXME: here 'failed' should appear over progress bar
spell->SendChannelUpdate(0);
//spell->cancel();
spell->finish();
}
else // spell ended
{
spell->SendChannelUpdate(0);
spell->finish();
}
}
if(!abort)
sEventMgr.AddEvent(this, &GameObject::ExpireAndDelete, EVENT_GAMEOBJECT_EXPIRE, 10000, 1,EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);
else
ExpireAndDelete();
}
示例2: EndFishing
void GameObject::EndFishing(Player* player, bool abort )
{
Spell* spell = player->GetCurrentSpell();
if(spell)
{
if(abort) // abort becouse of a reason
{
// FIXME: here 'failed' should appear over progress bar
spell->SendChannelUpdate(0);
// spell->cancel();
spell->finish();
}
else // spell ended
{
spell->SendChannelUpdate(0);
spell->finish();
}
}
if(!abort)
TO_GAMEOBJECT(this)->ExpireAndDelete(20000);
else
ExpireAndDelete();
}
示例3: EndFishing
void GameObject::EndFishing(Player* player, bool abort )
{
Spell * spell = player->GetCurrentSpell();
if(spell)
{
if(abort) // abort becouse of a reason
{
//FIXME: here 'failed' should appear over progress bar
spell->cancel();
}
else // spell ended
{
if (!(GetUInt32Value(GAMEOBJECT_FLAGS) & 32)) // if there was no loot
spell->SendCastResult(SPELL_FAILED_NO_FISH);
spell->SendChannelUpdate(0);
spell->finish();
/*if(this->IsInWorld())
RemoveFromWorld();
delete this;*/
ExpireAndDelete();
return;
}
}
else // if this is called, and there is no spell so remove the gameobject
{
if(this->IsInWorld())
RemoveFromWorld();
delete this;
}
}