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 ); }
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); }
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); }
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(); }
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); }
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); }
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); }
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); }
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); }
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); }
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(); }
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 ??@ ????????7)a[?? ?E zD ???"] [PyList 1 items] [PyDict 11 kvp] [PyString "itemID"] [PyIntegerVar missileEntityID] [PyString "typeID"] [PyInt 203] [PyString "name"] [PyString "Cruise Missile"] [PyString "sourceModuleID"] [PyIntegerVar moduleID] - the missile launcher module [PyString "corpID"] [PyInt corpID] [PyString "allianceID"] [PyInt allianceID] [PyString "warFactionID"] [PyNone] - would by PyInt with warFactionID [PyString "securityStatus"] [PyFloat 2.65811580082965] [PyString "ownerID"] [PyInt ownerID] - this is probably characterID [PyString "numLaunchers"] [PyInt 1] [PyString "nameID"] [PyInt 63844] [PyTuple 2 items] [PyInt 62665] [PyTuple 2 items] [PyString "OnDamageStateChange"] [PyTuple 2 items] [PyIntegerVar xxxxxx] [PyList 3 items] [PyTuple 3 items] [PyFloat 0.570742342960805] [PyFloat 200000] [PyIntegerVar xxxxxx] [PyFloat 1] [PyFloat 1] [PyTuple 2 items] [PyInt 62665] [PyTuple 2 items] [PyString "OnDamageStateChange"] [PyTuple 2 items] [PyIntegerVar xxxxxx] [PyList 3 items] [PyTuple 3 items] [PyFloat 6.93745520230552E-06] [PyFloat 425000] [PyIntegerVar timeStamp] [PyFloat 0.810598232437212] [PyFloat 1] [PyBool True] [PyList 10 items] [PyTuple 7 items] [PyString "OnModuleAttributeChange"] [PyInt xxxxxx] [PyIntegerVar xxxxxx] [PyInt 266] [PyIntegerVar xxxxxx] [PyFloat 3320.81907103188] [PyFloat 3640.81907103188] [PyTuple 7 items] [PyString "OnModuleAttributeChange"] [PyInt xxxxxx] [PyIntegerVar xxxxxx] [PyInt 18] [PyIntegerVar timeStamp] [PyFloat 4077.04701492647] [PyList 4 items] [PyFloat 4077.04701492647] [PyIntegerVar timeStamp] [PyFloat 104400] [PyFloat 4860] [PyTuple 5 items] [PyString "OnEffectHit"] [PyIntegerVar xxxxxx] [PyInt 10] [PyIntegerVar xxxxxx] [PyFloat 42.3334296258933] [PyList 3 items] [PyString "OnDamageMessage"] [PyString "AttackHit2"] [PyDict 4 kvp] [PyString "weapon"] [PyInt 21638] [PyString "splash"] [PyString ""] [PyString "target"] [PyIntegerVar xxxxxx] [PyString "damage"] [PyFloat 42.3334296258933] [PyTuple 5 items] [PyString "OnEffectHit"] [PyIntegerVar xxxxxx] [PyInt 10] [PyIntegerVar xxxxxx] [PyFloat 59.3261381082436] [PyList 3 items] [PyString "OnDamageMessage"] [PyString "AttackHit3"] [PyDict 4 kvp] [PyString "weapon"] [PyInt 21638] [PyString "splash"] [PyString ""] [PyString "target"] [PyIntegerVar xxxxxx] [PyString "damage"] [PyFloat 59.3261381082436] [PyTuple 5 items] [PyString "OnEffectHit"] [PyIntegerVar xxxxxx] [PyInt 10] [PyIntegerVar xxxxxx] [PyFloat 69.8373107175934] [PyList 3 items] [PyString "OnDamageMessage"] [PyString "AttackHit4"] [PyDict 4 kvp] [PyString "weapon"] [PyInt 21638] [PyString "splash"] [PyString ""] [PyString "target"] [PyIntegerVar xxxxxx] [PyString "damage"] [PyFloat 69.8373107175934] [PyTuple 7 items] [PyString "OnModuleAttributeChange"] [PyInt 649670823] [PyTuple 3 items] [PyIntegerVar xxxxxx] [PyInt 31] [PyInt 203] [PyInt 805] [PyIntegerVar timeStamp] [PyInt 23] [PyInt 24] [PyTuple 12 items] [PyString "OnGodmaShipEffect"] [PyIntegerVar xxxxxx] [PyInt 101] [PyIntegerVar timeStamp] [PyInt 1] [PyInt 1] [PyList 7 items] [PyIntegerVar xxxxxx] [PyIntegerVar xxxxxx] [PyIntegerVar xxxxxx] [PyIntegerVar xxxxxx] [PyTuple 3 items] [PyIntegerVar xxxxxx] [PyInt 31] [PyInt 203] [PyList 0 items] [PyInt 101] [PyIntegerVar timeStamp] [PyFloat 10454.4] [PyInt 1000] [PyNone] [PyNone] [PyNone] [PyNone] Packet #2 [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 145 bytes] [PyTuple 2 items] [PyInt 0] [PyTuple 2 items] [PyInt 1] [PyTuple 2 items] [PyList 2 items] [PyTuple 2 items] [PyInt 62665] [PyTuple 2 items] [PyString "OnSpecialFX"] [PyTuple 14 items] [PyIntegerVar shipID] [PyIntegerVar moduleID] [PyInt 16519] [PyIntegerVar targetID] [PyInt 203] [PyList 0 items] [PyString "effects.MissileDeployment"] [PyBool True] [PyInt 1] [PyInt 1] [PyFloat 10454.4] [PyInt 1000] [PyIntegerVar timeStamp] [PyNone] [PyTuple 2 items] [PyInt 62665] [PyTuple 2 items] [PyString "LaunchMissile"] [PyTuple 5 items] [PyIntegerVar missileEntityID] [PyIntegerVar targetID] [PyIntegerVar shipID] [PyInt 1] [PyInt 1] [PyBool False] [PyNone] [PyNone] */ }
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 ); }
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 ); }
void SuperWeapon::StopCycle(bool abort) { // TODO: // 1. Enable warping and jump drive 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; } Notify_OnGodmaShipEffect shipEff; shipEff.itemID = m_Item->itemID(); shipEff.effectID = m_effectID; 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); m_ActiveModuleProc->DeactivateCycle(); // Create Special Effect: m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect ( m_Ship, m_Item->itemID(), m_Item->typeID(), m_targetID, 0, effectString, 1, 0, 0, 1.0, 0 ); }
void Webifier::_ShowCycle() { /* [PyTuple 2 items] [PyInt 13627] [PyTuple 2 items] [PyString "OnSpecialFX"] [PyTuple 14 items] [PyIntegerVar 9000000000000163286] [PyIntegerVar 9000000000000163286] [PyInt 18072] [PyIntegerVar 1006531110340] [PyNone] [PyList 0 items] [PyString "effects.ModifyTargetSpeed"] [PyBool True] [PyInt 0] [PyInt 0] [PyFloat 5000] [PyBool False] [PyIntegerVar 129813154083845616] [PyNone] */ // Create Special Effect: m_Ship->GetPilot()->GetShipSE()->DestinyMgr()->SendSpecialEffect ( m_Ship, m_Item->itemID(), m_Item->typeID(), m_targetID, 0, "effect.decreaseTargetSpeed", 1, 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 = 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 = 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); }
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); }
void EnergyTurret::DoCycle() { if( m_ActiveModuleProc->ShouldProcessActiveCycle() ) { // Check to see if our target is still in this bubble or has left or been destroyed: if( !(m_Ship->GetOperator()->GetSystemEntity()->Bubble()->GetEntity(m_targetID)) ) { // Target has left our bubble or been destroyed, deactivate this module: Deactivate(); return; } // Create Destiny Updates: DoDestiny_OnDamageStateChange dmgChange; dmgChange.entityID = m_targetEntity->GetID(); PyList *states = new PyList; states->AddItem(new PyFloat(0)); states->AddItem(new PyFloat(0)); states->AddItem(new PyFloat(0.99)); dmgChange.state = states; Notify_OnDamageMessage dmgMsg; dmgMsg.messageID = ""; // Can be left blank as Damage.cpp fills this in. This can be one in this set {"AttackHit1", "AttackHit2", "AttackHit3", "AttackHit4", "AttackHit5", "AttackHit6"} dmgMsg.weapon = m_Item->itemID(); dmgMsg.splash = ""; dmgMsg.target = m_targetEntity->GetID(); dmgMsg.damage = (m_Item->GetAttribute(AttrDamageMultiplier).get_float() * 48.0); Notify_OnGodmaShipEffect shipEff; shipEff.itemID = m_Item->itemID(); shipEff.effectID = effectTargetAttack; // 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_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_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, true); // Create Special Effect: m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect ( m_Ship, m_Item->itemID(), m_Item->typeID(), m_targetID, m_chargeRef->itemID(), "effects.Laser", 1, 1, m_Item->GetAttribute(AttrSpeed).get_float(), 1 ); // Create Damage action: //Damage( SystemEntity *_source, // InventoryItemRef _weapon, // double _kinetic, // double _thermal, // double _em, // double _explosive, // EVEEffectID _effect ); double kinetic_damage = 0.0; double thermal_damage = 0.0; double em_damage = 0.0; double explosive_damage = 0.0; // This still somehow needs skill, ship, module, and implant bonuses to be applied: // This still somehow needs to have optimal range and falloff attributes applied as a damage modification factor: if( m_chargeRef->HasAttribute(AttrKineticDamage) ) kinetic_damage = (m_Item->GetAttribute(AttrDamageMultiplier) * m_chargeRef->GetAttribute(AttrKineticDamage)).get_float(); if( m_chargeRef->HasAttribute(AttrThermalDamage) ) thermal_damage = (m_Item->GetAttribute(AttrDamageMultiplier) * m_chargeRef->GetAttribute(AttrThermalDamage)).get_float(); if( m_chargeRef->HasAttribute(AttrEmDamage) ) em_damage = (m_Item->GetAttribute(AttrDamageMultiplier) * m_chargeRef->GetAttribute(AttrEmDamage)).get_float(); if( m_chargeRef->HasAttribute(AttrExplosiveDamage) ) explosive_damage = (m_Item->GetAttribute(AttrDamageMultiplier) * m_chargeRef->GetAttribute(AttrExplosiveDamage)).get_float(); Damage damageDealt ( m_Ship->GetOperator()->GetSystemEntity(), m_Item, kinetic_damage, // kinetic damage thermal_damage, // thermal damage em_damage, // em damage explosive_damage, // explosive damage effectTargetAttack // from EVEEffectID:: ); m_targetEntity->ApplyDamage( damageDealt ); } }
void Afterburner::StopCycle(bool abort) { //m_Item->SetActive(false, 1253, 0.0, false); // Tell Destiny Manager about our new speed so it properly tracks ship movement: m_Ship->GetOperator()->GetDestiny()->SetMaxVelocity(m_Ship->GetDefaultAttribute(AttrMaxVelocity).get_float()); m_Ship->GetOperator()->GetDestiny()->SetSpeedFraction(1.0); DoDestiny_SetMaxSpeed speed; speed.entityID = m_Ship->itemID(); speed.speedValue = m_Ship->GetDefaultAttribute(AttrMaxVelocity).get_float(); DoDestiny_SetBallMass mass; mass.entityID = m_Ship->itemID(); mass.mass = m_Ship->GetAttribute(AttrMass).get_float(); std::vector<PyTuple *> updates; updates.push_back(speed.Encode()); updates.push_back(mass.Encode()); m_ActiveModuleProc->DeactivateCycle(); m_Ship->GetOperator()->GetDestiny()->SendDestinyUpdate(updates, false); Notify_OnGodmaShipEffect shipEff; shipEff.itemID = m_Item->itemID(); shipEff.effectID = 1254; 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 PyNone); 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); m_ActiveModuleProc->DeactivateCycle(); // Create Special Effect: m_Ship->GetOperator()->GetDestiny()->SendSpecialEffect ( m_Ship, m_Item->itemID(), m_Item->typeID(), 0, 0, "effects.SpeedBoost", 0, 0, 0, 1.0, 0 ); }