本文整理汇总了C++中Notify_OnGodmaShipEffect类的典型用法代码示例。如果您正苦于以下问题:C++ Notify_OnGodmaShipEffect类的具体用法?C++ Notify_OnGodmaShipEffect怎么用?C++ Notify_OnGodmaShipEffect使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Notify_OnGodmaShipEffect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Deactivate
void EnergyTurret::Deactivate()
{
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = 10;
shipEff.when = Win32TimeNow();
shipEff.start = 0;
shipEff.active = 0;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(targetID));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(10));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = 1584;
shipEff.repeat = new PyInt(0);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyList* events = new PyList;
events->AddItem(shipEff.Encode());
Notify_OnMultiEvent multi;
multi.events = events;
PyTuple* tmp = multi.Encode();
m_Ship->GetOperator()->SendDogmaNotification("OnMultiEvent", "clientID", &tmp);
}
示例2: StopCycle
void Webifier::StopCycle(bool abort)
{
double timeLeft = m_AMPC->GetRemainingCycleTimeMS();
timeLeft /= 100;
// Create Special Effect:
m_Ship->GetPilot()->GetShipSE()->DestinyMgr()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
m_targetID,
0,
"effect.decreaseTargetSpeed",
0,
0,
0,
timeLeft,
0
);
// Create Destiny Updates:
GodmaOther go;
go.shipID = m_Ship->itemID();
go.slotID = m_Item->flag();
go.chargeTypeID = 0;
GodmaEnvironment ge;
ge.selfID = m_Item->itemID();
ge.charID = m_Ship->ownerID();
ge.shipID = go.shipID;
ge.targetID = m_targetID;
ge.other = go.Encode();
ge.area = new PyList;
ge.effectID = effectDecreaseTargetSpeed;
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = ge.selfID;
shipEff.effectID = ge.effectID;
shipEff.timeNow = Win32TimeNow();
shipEff.start = 0;
shipEff.active = 0;
shipEff.environment = ge.Encode();
shipEff.startTime = (shipEff.timeNow - (timeLeft * Win32Time_Second));
shipEff.duration = timeLeft;
shipEff.repeat = 0;
shipEff.error = new PyNone;
PyList* events = new PyList;
events->AddItem(shipEff.Encode());
Notify_OnMultiEvent multi;
multi.events = events;
PyTuple* tmp2 = multi.Encode();
m_Ship->GetPilot()->SendNotification("OnMultiEvent", "clientID", &tmp2);
}
示例3: _ShowCycle
void HybridTurret::_ShowCycle()
{
//m_Item->SetActive(true, effectProjectileFired, m_Item->GetAttribute(AttrSpeed).get_float(), true);
// Create Destiny Updates:
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = effectProjectileFired; // From EVEEffectID::
shipEff.when = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(m_targetID));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(shipEff.effectID));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = m_Item->GetAttribute(AttrSpeed).get_float();
shipEff.repeat = new PyInt(1000);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyTuple* tmp = new PyTuple(3);
//tmp->SetItem(1, dmgMsg.Encode());
tmp->SetItem(2, shipEff.Encode());
std::vector<PyTuple*> events;
//events.push_back(dmgMsg.Encode());
events.push_back(shipEff.Encode());
std::vector<PyTuple*> updates;
//updates.push_back(dmgChange.Encode());
m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, events, false);
// Create Special Effect:
m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
m_targetID,
m_chargeRef->typeID(),
"effects.HybridFired",
1,
1,
1,
m_Item->GetAttribute(AttrSpeed).get_float(),
1000
);
}
示例4: DoCycle
void MissileLauncher::StopCycle(bool abort)
{
// Do one last cycle:
DoCycle();
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = effectMissileLaunching;
shipEff.when = Win32TimeNow();
shipEff.start = 0;
shipEff.active = 0;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(m_targetID));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(shipEff.effectID));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = 1.0; //m_ActiveModuleProc->GetRemainingCycleTimeMS(); // At least, I'm assuming this is the remaining time left in the cycle
shipEff.repeat = new PyInt(0);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyList* events = new PyList;
events->AddItem(shipEff.Encode());
Notify_OnMultiEvent multi;
multi.events = events;
PyTuple* tmp = multi.Encode();
m_Ship->GetOperator()->SendDogmaNotification("OnMultiEvent", "clientID", &tmp);
// Create Special Effect:
m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
m_targetID,
m_chargeRef->itemID(),
"effects.MissileDeployment",
1,
0,
0,
1.0,
0
);
m_ActiveModuleProc->DeactivateCycle();
}
示例5: _GetDuration
void ShieldHardener::_ShowCycle()
{
// Create Special Effect:
m_Ship->GetPilot()->GetShipSE()->DestinyMgr()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
0,
0,
"effects.ModifyShieldResonance",
0,
1,
1,
_GetDuration(),
1
);
// Create Destiny Updates:
GodmaOther go;
go.shipID = m_Ship->itemID();
go.slotID = m_Item->flag();
go.chargeTypeID = 0;
GodmaEnvironment ge;
ge.selfID = m_Item->itemID();
ge.charID = m_Ship->ownerID();
ge.shipID = go.shipID;
ge.targetID = 0;
ge.other = go.Encode();
ge.area = new PyList;
ge.effectID = effectModifyActiveShieldResonanceAndNullifyPassiveResonance;
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = ge.selfID;
shipEff.effectID = ge.effectID;
shipEff.timeNow = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
shipEff.environment = ge.Encode();
shipEff.startTime = shipEff.timeNow;
shipEff.duration = _GetDuration();
shipEff.repeat = 1000; /* boolean of repeatable cycles without pilot activation */
shipEff.error = new PyNone;
std::vector<PyTuple*> events;
events.push_back(shipEff.Encode());
std::vector<PyTuple*> updates;
m_Ship->GetPilot()->GetShipSE()->DestinyMgr()->SendDestinyUpdate(updates, events, false);
}
示例6: _GetDuration
void ShieldTransporter::_ShowCycle()
{
// Create Special Effect:
m_Ship->GetPilot()->GetShipSE()->DestinyMgr()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
m_targetID,
0,
"effects.ShieldTransfer",
0,
1,
1,
_GetDuration(),
1
);
// Create Destiny Updates:
GodmaEnvironment ge;
ge.selfID = m_Item->itemID();
ge.charID = m_Ship->ownerID();
ge.shipID = m_Ship->itemID();;
ge.targetID = m_targetID;
ge.other = new PyNone;
ge.area = new PyList;
ge.effectID = effectShieldTransfer;
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = ge.selfID;
shipEff.effectID = ge.effectID;
shipEff.timeNow = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
shipEff.environment = ge.Encode();
shipEff.startTime = shipEff.timeNow;
shipEff.duration = _GetDuration();
shipEff.repeat = 0; /* boolean of repeatable cycles without pilot activation */
shipEff.error = new PyNone;
std::vector<PyTuple*> events;
events.push_back(shipEff.Encode());
std::vector<PyTuple*> updates;
m_Ship->GetPilot()->GetShipSE()->DestinyMgr()->SendDestinyUpdate(updates, events, false);
}
示例7: StopCycle
void ShieldHardener::StopCycle(bool abort)
{
// Create Destiny Updates:
GodmaOther go;
go.shipID = m_Ship->itemID();
go.slotID = m_Item->flag();
go.chargeTypeID = 0;
GodmaEnvironment ge;
ge.selfID = m_Item->itemID();
ge.charID = m_Ship->ownerID();
ge.shipID = go.shipID;
ge.targetID = 0;
ge.other = go.Encode();
ge.area = new PyList;
ge.effectID = effectModifyActiveShieldResonanceAndNullifyPassiveResonance;
uint32 timeLeft = m_AMPC->GetRemainingCycleTimeMS();
timeLeft /= 100;
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = ge.selfID;
shipEff.effectID = ge.effectID;
shipEff.timeNow = Win32TimeNow();
shipEff.start = 0;
shipEff.active = 0;
shipEff.environment = ge.Encode();
shipEff.startTime = (shipEff.timeNow - (timeLeft * Win32Time_Second));
shipEff.duration = timeLeft;
shipEff.repeat = 0;
shipEff.error = new PyNone;
PyList* events = new PyList;
events->AddItem(shipEff.Encode());
Notify_OnMultiEvent multi;
multi.events = events;
PyTuple* tmp = multi.Encode();
m_Ship->GetPilot()->SendNotification("OnMultiEvent", "clientID", &tmp);
}
示例8: SetAttribute
void InventoryItem::SetOnline(bool newval) {
SetAttribute(AttrIsOnline, int(newval));
Client *c = sEntityList.FindCharacter(m_ownerID);
if(c == NULL)
{
sLog.Error("InventoryItem", "unable to set ourselfs online//offline because we can't find the client");
return;
}
Notify_OnGodmaShipEffect ogf;
ogf.itemID = m_itemID;
ogf.effectID = effectOnline;
ogf.when = Win32TimeNow();
ogf.start = newval?1:0;
ogf.active = newval?1:0;
//list start
ogf.env_itemID = ogf.itemID;
ogf.env_charID = m_ownerID; //??
ogf.env_shipID = m_locationID;
ogf.env_target = m_locationID;
ogf.env_effectID = ogf.effectID;
ogf.startTime = ogf.when;
ogf.duration = ogf.duration; //INT_MAX; //I think this should be infinity (0x07 may be infinity?)
//list end
if(newval)
ogf.repeat = new PyInt(1000);
else
ogf.repeat = new PyInt(0);
ogf.randomSeed = new PyNone();
ogf.error = new PyNone();
ogf.env_other = new PyNone();
ogf.env_area = new PyList();
Notify_OnMultiEvent multi;
multi.events = new PyList;
multi.events->AddItem( ogf.Encode() );
PyTuple* tmp = multi.Encode(); //this is consumed below
c->SendNotification("OnMultiEvent", "clientID", &tmp);
}
示例9: SetAttribute
void InventoryItem::SetOnline(bool online) {
SetAttribute(AttrIsOnline, int(online));
Client *c = sEntityList.FindCharacter(m_ownerID);
if(c == NULL)
{
sLog.Error("InventoryItem", "unable to set ourselfs online//offline because we can't find the client");
return;
}
Notify_OnGodmaShipEffect ogf;
ogf.itemID = m_itemID;
ogf.effectID = effectOnline;
ogf.when = Win32TimeNow();
ogf.start = online?1:0;
ogf.active = online?1:0;
PyList *environment = new PyList;
environment->AddItem(new PyInt(ogf.itemID));
environment->AddItem(new PyInt(m_ownerID));
environment->AddItem(new PyInt(m_locationID));
environment->AddItem(new PyNone);
environment->AddItem(new PyNone);
environment->AddItem(new PyNone);
environment->AddItem(new PyInt(ogf.effectID));
ogf.environment = environment;
ogf.startTime = ogf.when;
ogf.duration = 10000;
ogf.repeat = online?new PyInt(1000):new PyInt(0);
ogf.randomSeed = new PyNone();
ogf.error = new PyNone();
Notify_OnMultiEvent multi;
multi.events = new PyList;
multi.events->AddItem( ogf.Encode() );
PyTuple* tmp = multi.Encode(); //this is consumed below
c->SendNotification("OnMultiEvent", "clientID", &tmp);
}
示例10: SetActive
void InventoryItem::SetActive(bool active, uint32 effectID, double duration, bool repeat)
{
Client* c = sEntityList.FindCharacter(m_ownerID);
if(c == NULL)
{
sLog.Error("InventoryItem", "unable to set ourselfs online//offline because we can't find the client");
return;
}
Notify_OnGodmaShipEffect shipEffect;
shipEffect.itemID = m_itemID;
shipEffect.effectID = effectID;
shipEffect.when = Win32TimeNow();
shipEffect.start = active?1:0;
shipEffect.active = active?1:0;
PyList* env = new PyList;
env->AddItem(new PyInt(m_itemID));
env->AddItem(new PyInt(ownerID()));
env->AddItem(new PyInt(m_locationID));
env->AddItem(new PyNone); //targetID
env->AddItem(new PyNone); //otherID
env->AddItem(new PyNone); //area
env->AddItem(new PyInt(effectID));
shipEffect.environment = env;
shipEffect.startTime = shipEffect.when;
shipEffect.duration = duration;
shipEffect.repeat = repeat?new PyInt(1000):new PyInt(0);
shipEffect.randomSeed = new PyNone;
shipEffect.error = new PyNone;
Notify_OnMultiEvent multi;
multi.events = new PyList;
multi.events->AddItem(shipEffect.Encode());
PyTuple* tmp = multi.Encode(); //this is consumed below
c->SendNotification("OnMultiEvent", "clientID", &tmp);
}
示例11: Deactivate
void EnergyTurret::Deactivate()
{
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = effectTargetAttack;
shipEff.when = Win32TimeNow();
shipEff.start = 0;
shipEff.active = 0;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(m_targetEntity->GetID()));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(10));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = m_ActiveModuleProc->GetRemainingCycleTimeMS(); // At least, I'm assuming this is the remaining time left in the cycle
shipEff.repeat = new PyInt(0);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyList* events = new PyList;
events->AddItem(shipEff.Encode());
Notify_OnMultiEvent multi;
multi.events = events;
PyTuple* tmp = multi.Encode();
m_Ship->GetOperator()->SendDogmaNotification("OnMultiEvent", "clientID", &tmp);
m_ActiveModuleProc->DeactivateCycle();
}
示例12: _ShowCycle
void MissileLauncher::_ShowCycle()
{
// Create Destiny Updates:
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = effectMissileLaunching; // From EVEEffectID::
shipEff.when = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(m_targetID));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(shipEff.effectID));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = m_Item->GetAttribute(AttrSpeed).get_float();
shipEff.repeat = new PyInt(1000);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyTuple* tmp = new PyTuple(3);
//tmp->SetItem(1, dmgMsg.Encode());
tmp->SetItem(2, shipEff.Encode());
std::vector<PyTuple*> events;
//events.push_back(dmgMsg.Encode());
events.push_back(shipEff.Encode());
std::vector<PyTuple*> updates;
//updates.push_back(dmgChange.Encode());
m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, events, false);
// Create Special Effect:
m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
m_targetID,
m_chargeRef->typeID(),
"effects.MissileDeployment",
1,
1,
1,
m_Item->GetAttribute(AttrSpeed).get_float(),
1000
);
// Actually Launch a missile, creating a new Destiny object for it, but we don't know how to do this yet...
// TODO - RESEARCH
// (packets sent by server upon missile launch)
/*
Packet #1
[PyObjectData Name: macho.Notification]
[PyTuple 7 items]
[PyInt 12]
[PyObjectData Name: macho.MachoAddress]
[PyTuple 4 items]
[PyInt 1]
[PyInt 790408]
[PyNone]
[PyNone]
[PyObjectData Name: macho.MachoAddress]
[PyTuple 4 items]
[PyInt 4]
[PyString "DoDestinyUpdate"]
[PyList 0 items]
[PyString "clientID"]
[PyInt 5894042]
[PyTuple 1 items]
[PyTuple 2 items]
[PyInt 0]
[PySubStream 888 bytes]
[PyTuple 2 items]
[PyInt 0]
[PyTuple 2 items]
[PyInt 1]
[PyTuple 3 items]
[PyList 3 items]
[PyTuple 2 items]
[PyInt 62665]
[PyTuple 2 items]
[PyString "PackagedAction"]
[PySubStream 270 bytes]
[PyList 1 items]
[PyTuple 2 items]
[PyInt 62665]
[PyTuple 2 items]
[PyString "AddBalls2"]
[PyTuple 1 items]
[PyTuple 2 items]
[PyString "?? ?+??Pl?| ?C????8?B)??u3??As"?E??B [email protected] ????????7)a[?? ?E zD ???"]
//.........这里部分代码省略.........
示例13: PyFloat
void EnergyTurret::Activate(uint32 targetID)
{
DoDestiny_OnDamageStateChange dmgChange;
dmgChange.entityID = targetID;
PyList *states = new PyList;
states->AddItem(new PyFloat(0));
states->AddItem(new PyFloat(0));
states->AddItem(new PyFloat(0.99));
dmgChange.state = states;
m_Ship->SetAttribute(AttrCharge, 139);
Notify_OnEffectHit effHit;
effHit.itemID = m_Item->itemID();
effHit.effectID = 10;
effHit.targetID = targetID;
effHit.damage = 5;
Notify_OnDamageMessage dmgMsg;
dmgMsg.messageID = "AttackHit3";
dmgMsg.weapon = 3634;
dmgMsg.splash = "";
dmgMsg.target = targetID;
dmgMsg.damage = 5;
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = 10;
shipEff.when = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(targetID));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(10));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = 1584;
shipEff.repeat = new PyInt(1000);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyTuple* tmp = new PyTuple(3);
tmp->SetItem(0, effHit.Encode());
tmp->SetItem(1, dmgMsg.Encode());
tmp->SetItem(2, shipEff.Encode());
std::vector<PyTuple*> events;
events.push_back(effHit.Encode());
events.push_back(dmgMsg.Encode());
events.push_back(shipEff.Encode());
std::vector<PyTuple*> updates;
updates.push_back(dmgChange.Encode());
m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, events, true);
}
示例14: _ShowCycle
void Afterburner::_ShowCycle()
{
//m_Item->SetActive(true, 1253, m_Item->GetAttribute(AttrDuration).get_float(), true);
double implantBonuses = 1.0; // TODO: gather and accumulate all implant bonuses for MWDs/Afterburners
double accelerationControlSkillLevel = 0.0; // TODO: Figure out how to get access to skills list of character running this ship and get this value
double boostSpeed = m_Ship->GetAttribute(AttrMaxVelocity).get_float() * (1.0 + (m_Item->GetAttribute(AttrSpeedFactor).get_float() / 100.0 * (1 + accelerationControlSkillLevel * 0.05) * (implantBonuses) * (m_Item->GetAttribute(AttrSpeedBoostFactor).get_float() / (m_Ship->GetAttribute(AttrMass).get_float()))));
// Tell Destiny Manager about our new speed so it properly tracks ship movement:
m_Ship->GetOperator()->GetDestiny()->SetMaxVelocity(boostSpeed);
m_Ship->GetOperator()->GetDestiny()->SetSpeedFraction(1.0);
DoDestiny_SetBallMass mass;
mass.entityID = m_Ship->itemID();
mass.mass = m_Ship->GetAttribute(AttrMass).get_float();
DoDestiny_SetMaxSpeed speed;
speed.entityID = m_Ship->itemID();
speed.speedValue = boostSpeed;
std::vector<PyTuple *> updates;
updates.push_back(mass.Encode());
updates.push_back(speed.Encode());
//m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, false);
// Create Destiny Updates:
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = 1254; // From EVEEffectID::
shipEff.when = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(shipEff.effectID));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = m_Item->GetAttribute(AttrDuration).get_float();
shipEff.repeat = new PyInt(1000);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyTuple* tmp = new PyTuple(3);
//tmp->SetItem(1, dmgMsg.Encode());
tmp->SetItem(2, shipEff.Encode());
std::vector<PyTuple*> events;
//events.push_back(dmgMsg.Encode());
events.push_back(shipEff.Encode());
//std::vector<PyTuple*> updates;
//updates.push_back(dmgChange.Encode());
m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, events, false);
// Create Special Effect:
m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
0,
0,
"effects.SpeedBoost",
0,
1,
1,
m_Item->GetAttribute(AttrDuration).get_float(),
1000
);
}
示例15: switch
void SuperWeapon::_ShowCycle()
{
std::string effectString;
switch (m_Item->typeID())
{
case 24550:
effectString = "effects.SuperWeaponAmarr";
m_effectID = effectSuperWeaponAmarr;
break;
case 24552:
effectString = "effects.SuperWeaponCaldari";
m_effectID = effectSuperWeaponCaldari;
break;
case 24554:
effectString = "effects.SuperWeaponGallente";
m_effectID = effectSuperWeaponGallente;
break;
case 23674:
effectString = "effects.SuperWeaponMinmatar";
m_effectID = effectSuperWeaponMinmatar;
break;
default:
effectString = "";
m_effectID = 0;
break;
}
// Create Destiny Updates:
Notify_OnGodmaShipEffect shipEff;
shipEff.itemID = m_Item->itemID();
shipEff.effectID = m_effectID; // From EVEEffectID::
shipEff.when = Win32TimeNow();
shipEff.start = 1;
shipEff.active = 1;
PyList* env = new PyList;
env->AddItem(new PyInt(shipEff.itemID));
env->AddItem(new PyInt(m_Ship->ownerID()));
env->AddItem(new PyInt(m_Ship->itemID()));
env->AddItem(new PyInt(m_targetID));
env->AddItem(new PyNone);
env->AddItem(new PyNone);
env->AddItem(new PyInt(shipEff.effectID));
shipEff.environment = env;
shipEff.startTime = shipEff.when;
shipEff.duration = m_Item->GetAttribute(AttrDuration).get_float();
shipEff.repeat = new PyInt(1000);
shipEff.randomSeed = new PyNone;
shipEff.error = new PyNone;
PyTuple* tmp = new PyTuple(3);
//tmp->SetItem(1, dmgMsg.Encode());
tmp->SetItem(2, shipEff.Encode());
std::vector<PyTuple*> events;
//events.push_back(dmgMsg.Encode());
events.push_back(shipEff.Encode());
std::vector<PyTuple*> updates;
//updates.push_back(dmgChange.Encode());
m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, events, false);
// Create Special Effect:
m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect
(
m_Ship,
m_Item->itemID(),
m_Item->typeID(),
m_targetID,
0,
effectString,
1,
1,
1,
m_Item->GetAttribute(AttrDuration).get_float(),
1000
);
}