本文整理汇总了C++中Transporter::Destruct方法的典型用法代码示例。如果您正苦于以下问题:C++ Transporter::Destruct方法的具体用法?C++ Transporter::Destruct怎么用?C++ Transporter::Destruct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transporter
的用法示例。
在下文中一共展示了Transporter::Destruct方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadTransporters
void ObjectMgr::LoadTransporters()
{
#ifdef CLUSTERING
return;
#endif
Log.Notice("ObjectMgr", "Loading Transports...");
QueryResult * QR = WorldDatabase.Query("SELECT entry FROM gameobject_names WHERE type = %u", GAMEOBJECT_TYPE_MO_TRANSPORT);
if(!QR)
return;
int64 total = QR->GetRowCount();
TransportersCount = total;
uint32 entry = NULL;
Transporter* pTransporter = NULL;
do
{
entry = QR->Fetch()[0].GetUInt32();
pTransporter = new Transporter((uint64)HIGHGUID_TYPE_TRANSPORTER<<32 | entry);
pTransporter->Init();
if(!pTransporter->CreateAsTransporter(entry, ""))
{
Log.Warning("ObjectMgr","Skipped invalid transporterid %d.", entry);
pTransporter->Destruct();
pTransporter = NULL;
}
else
{
AddTransport(pTransporter);
QueryResult * result2 = WorldDatabase.Query("SELECT * FROM transport_creatures WHERE transport_entry = %u", entry);
if(result2)
{
do
{
pTransporter->AddNPC(result2->Fetch()[1].GetUInt32(), result2->Fetch()[2].GetFloat(),
result2->Fetch()[3].GetFloat(), result2->Fetch()[4].GetFloat(),
result2->Fetch()[5].GetFloat());
} while (result2->NextRow());
delete result2;
}
}
} while(QR->NextRow());
delete QR;
}