本文整理汇总了C++中CreaturePointer::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ CreaturePointer::Load方法的具体用法?C++ CreaturePointer::Load怎么用?C++ CreaturePointer::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CreaturePointer
的用法示例。
在下文中一共展示了CreaturePointer::Load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Temper
bool Temper(uint32 i, SpellPointer pSpell)
{
if( !pSpell->u_caster )
return false;
UnitPointer _unit = pSpell->u_caster;
//summon several Molten Golem's
for( uint8 i=0; i<GOLEMS_COUNT; i++ )
{
CreatureProto *cp = CreatureProtoStorage.LookupEntry(MOLTEN_GOLEM_ENTRY);
CreatureInfo *ci = CreatureNameStorage.LookupEntry(MOLTEN_GOLEM_ENTRY);
CreaturePointer c = NULLCREATURE;
if (cp && ci)
{
c = _unit->GetMapMgr()->CreateCreature( MOLTEN_GOLEM_ENTRY );
if (c)
{
c->Load(cp, _unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 0.0f);
c->PushToWorld(_unit->GetMapMgr());
c->SetUInt64Value( UNIT_FIELD_SUMMONEDBY, _unit->GetGUID() );
}
}
}
return true;
}
示例2: OnCombatStart
void OnCombatStart(UnitPointer mTarget)
{
_unit->SendChatMessage( CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "You wish to confront the master? You must weather the storm!");
spark_timer = 0;
last_creation_hp = 100;
RegisterAIUpdateEvent(_unit->GetUInt32Value(UNIT_FIELD_BASEATTACKTIME));
for( uint8 i=0; i<SPARKS_COUNT; i++)
{
CreatureProto *cp = CreatureProtoStorage.LookupEntry(28926);
CreatureInfo *ci = CreatureNameStorage.LookupEntry(28926);
CreaturePointer c = NULLCREATURE;
if (cp && ci)
{
c = _unit->GetMapMgr()->CreateCreature( 28926 );
if (c)
{
c->Load(cp,_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), _unit->GetOrientation());
c->PushToWorld(_unit->GetMapMgr());
sparks[i] = c->GetGUID();
c->Root();
c->GetAIInterface()->disable_combat = true;
for( uint8 i=0; i<7; i++ )
c->SchoolImmunityList[i] = 1;
}
}
}
}
示例3: SpawnCreature
CreaturePointer MapScriptInterface::SpawnCreature(uint32 Entry, float cX, float cY, float cZ, float cO, bool AddToWorld, bool tmplate, uint32 Misc1, uint32 Misc2)
{
CreatureProto * proto = CreatureProtoStorage.LookupEntry(Entry);
CreatureInfo * info = CreatureNameStorage.LookupEntry(Entry);
if(proto == 0 || info == 0)
{
return NULLCREATURE;
}
CreatureSpawn * sp = new CreatureSpawn;
sp->entry = Entry;
sp->form = 0;
sp->id = 0;
sp->movetype = 0;
sp->x = cX;
sp->y = cY;
sp->z = cZ;
sp->o = cO;
sp->emote_state =0;
sp->flags = 0;
sp->factionid = proto->Faction;
sp->bytes=0;
sp->bytes1=0;
sp->bytes2=0;
sp->displayid=0;
sp->stand_state = 0;
sp->channel_spell=sp->channel_target_creature=sp->channel_target_go=0;
sp->MountedDisplayID = 0;
sp->phase = 1;
sp->vehicle = proto->vehicle_entry;
CreaturePointer p = this->mapMgr->CreateCreature(Entry);
ASSERT(p);
p->Load(sp, (uint32)NULL, NULL);
p->spawnid = 0;
p->m_spawn = NULL;
delete sp;
if( AddToWorld )
p->PushToWorld(mapMgr);
return p;
}