mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
GetCWPX(), GetCWPY(), GetCWPZ(), GetCWPH() converted to GetCurrentWayPoint
This commit is contained in:
parent
f63c5ab6ba
commit
d9d89ba9b3
@ -2551,7 +2551,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
peekTrade = 0x20,
|
peekTrade = 0x20,
|
||||||
peekWorld = 0x40
|
peekWorld = 0x40
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
|
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
|
||||||
c->Message(0, "You must have a PC target selected for this command");
|
c->Message(0, "You must have a PC target selected for this command");
|
||||||
return;
|
return;
|
||||||
@ -2605,10 +2605,10 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
instMain = targetClient->GetInv().GetItem(MainPowerSource);
|
instMain = targetClient->GetInv().GetItem(MainPowerSource);
|
||||||
itemData = (instMain ? instMain->GetItem() : nullptr);
|
itemData = (instMain ? instMain->GetItem() : nullptr);
|
||||||
itemLinkCore = nullptr;
|
itemLinkCore = nullptr;
|
||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "WornSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "WornSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
@ -2625,9 +2625,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "InvSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "InvSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2640,9 +2640,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instSub);
|
c->MakeItemLink(itemLinkCore, instSub);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
||||||
|
|
||||||
@ -2665,9 +2665,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "CursorSlot: %i, Depth: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "CursorSlot: %i, Depth: %i, Item: %i (%s), Charges: %i",
|
||||||
MainCursor, cursorDepth, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
MainCursor, cursorDepth, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2680,9 +2680,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instSub);
|
c->MakeItemLink(itemLinkCore, instSub);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(MainCursor, indexSub), MainCursor, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
Inventory::CalcSlotId(MainCursor, indexSub), MainCursor, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
||||||
|
|
||||||
@ -2700,9 +2700,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "TributeSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "TributeSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2717,9 +2717,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null" );
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null" );
|
||||||
|
|
||||||
c->Message((itemData == 0), "BankSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "BankSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2732,9 +2732,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instSub);
|
c->MakeItemLink(itemLinkCore, instSub);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
||||||
|
|
||||||
@ -2749,9 +2749,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "SharedBankSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "SharedBankSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2764,9 +2764,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instSub);
|
c->MakeItemLink(itemLinkCore, instSub);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), " SharedBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), " SharedBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
||||||
|
|
||||||
@ -2782,9 +2782,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "TradeSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "TradeSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
indexMain, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2797,9 +2797,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instSub);
|
c->MakeItemLink(itemLinkCore, instSub);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
Inventory::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
||||||
|
|
||||||
@ -2824,9 +2824,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instMain);
|
c->MakeItemLink(itemLinkCore, instMain);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instMain->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), "WorldSlot: %i, Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), "WorldSlot: %i, Item: %i (%s), Charges: %i",
|
||||||
(EmuConstants::WORLD_BEGIN + indexMain), ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
(EmuConstants::WORLD_BEGIN + indexMain), ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instMain->GetCharges()));
|
||||||
|
|
||||||
@ -2839,9 +2839,9 @@ void command_peekinv(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
if (itemData)
|
if (itemData)
|
||||||
c->MakeItemLink(itemLinkCore, instSub);
|
c->MakeItemLink(itemLinkCore, instSub);
|
||||||
|
|
||||||
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
itemLink = (itemLinkCore ? StringFormat("%c%s%s%c", 0x12, itemLinkCore, instSub->GetItem()->Name, 0x12) : "null");
|
||||||
|
|
||||||
c->Message((itemData == 0), " WorldBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
c->Message((itemData == 0), " WorldBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i",
|
||||||
INVALID_INDEX, indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
INVALID_INDEX, indexMain, indexSub, ((itemData == 0) ? 0 : itemData->ID), itemLink.c_str(), ((itemData == 0) ? 0 : instSub->GetCharges()));
|
||||||
|
|
||||||
@ -7590,7 +7590,7 @@ void command_pf(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
Mob *who = c->GetTarget();
|
Mob *who = c->GetTarget();
|
||||||
c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ());
|
c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ());
|
||||||
c->Message(0, "WP: (%.2f, %.2f, %.2f) (%d/%d)", who->GetCWPX(), who->GetCWPY(), who->GetCWPZ(), who->GetCWP(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1);
|
c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1);
|
||||||
c->Message(0, "TAR: (%.2f, %.2f, %.2f)", who->GetTarX(), who->GetTarY(), who->GetTarZ());
|
c->Message(0, "TAR: (%.2f, %.2f, %.2f)", who->GetTarX(), who->GetTarY(), who->GetTarZ());
|
||||||
c->Message(0, "TARV: (%.2f, %.2f, %.2f)", who->GetTarVX(), who->GetTarVY(), who->GetTarVZ());
|
c->Message(0, "TARV: (%.2f, %.2f, %.2f)", who->GetTarVX(), who->GetTarVY(), who->GetTarVZ());
|
||||||
c->Message(0, "|TV|=%.2f index=%d", who->GetTarVector(), who->GetTarNDX());
|
c->Message(0, "|TV|=%.2f index=%d", who->GetTarVector(), who->GetTarNDX());
|
||||||
|
|||||||
@ -626,7 +626,7 @@ double Lua_Mob::ResistSpell(int resist_type, int spell_id, Lua_Mob caster, bool
|
|||||||
return self->ResistSpell(resist_type, spell_id, caster, use_resist_override, resist_override);
|
return self->ResistSpell(resist_type, spell_id, caster, use_resist_override, resist_override);
|
||||||
}
|
}
|
||||||
|
|
||||||
double Lua_Mob::ResistSpell(int resist_type, int spell_id, Lua_Mob caster, bool use_resist_override, int resist_override,
|
double Lua_Mob::ResistSpell(int resist_type, int spell_id, Lua_Mob caster, bool use_resist_override, int resist_override,
|
||||||
bool charisma_check) {
|
bool charisma_check) {
|
||||||
Lua_Safe_Call_Real();
|
Lua_Safe_Call_Real();
|
||||||
return self->ResistSpell(resist_type, spell_id, caster, use_resist_override, resist_override, charisma_check);
|
return self->ResistSpell(resist_type, spell_id, caster, use_resist_override, resist_override, charisma_check);
|
||||||
@ -669,22 +669,22 @@ double Lua_Mob::GetHeading() {
|
|||||||
|
|
||||||
double Lua_Mob::GetWaypointX() {
|
double Lua_Mob::GetWaypointX() {
|
||||||
Lua_Safe_Call_Real();
|
Lua_Safe_Call_Real();
|
||||||
return self->GetCWPX();
|
return self->GetCurrentWayPoint().m_X;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Lua_Mob::GetWaypointY() {
|
double Lua_Mob::GetWaypointY() {
|
||||||
Lua_Safe_Call_Real();
|
Lua_Safe_Call_Real();
|
||||||
return self->GetCWPY();
|
return self->GetCurrentWayPoint().m_Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Lua_Mob::GetWaypointZ() {
|
double Lua_Mob::GetWaypointZ() {
|
||||||
Lua_Safe_Call_Real();
|
Lua_Safe_Call_Real();
|
||||||
return self->GetCWPZ();
|
return self->GetCurrentWayPoint().m_Z;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Lua_Mob::GetWaypointH() {
|
double Lua_Mob::GetWaypointH() {
|
||||||
Lua_Safe_Call_Real();
|
Lua_Safe_Call_Real();
|
||||||
return self->GetCWPH();
|
return self->GetCurrentWayPoint().m_Heading;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Lua_Mob::GetWaypointPause() {
|
double Lua_Mob::GetWaypointPause() {
|
||||||
@ -772,19 +772,19 @@ bool Lua_Mob::CastSpell(int spell_id, int target_id, int slot, int cast_time, in
|
|||||||
return self->CastSpell(spell_id, target_id, slot, cast_time, mana_cost, nullptr, static_cast<uint32>(item_slot));
|
return self->CastSpell(spell_id, target_id, slot, cast_time, mana_cost, nullptr, static_cast<uint32>(item_slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Lua_Mob::CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer,
|
bool Lua_Mob::CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer,
|
||||||
int timer_duration) {
|
int timer_duration) {
|
||||||
Lua_Safe_Call_Bool();
|
Lua_Safe_Call_Bool();
|
||||||
return self->CastSpell(spell_id, target_id, slot, cast_time, mana_cost, nullptr, static_cast<uint32>(item_slot),
|
return self->CastSpell(spell_id, target_id, slot, cast_time, mana_cost, nullptr, static_cast<uint32>(item_slot),
|
||||||
static_cast<uint32>(timer), static_cast<uint32>(timer_duration));
|
static_cast<uint32>(timer), static_cast<uint32>(timer_duration));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Lua_Mob::CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer,
|
bool Lua_Mob::CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer,
|
||||||
int timer_duration, int resist_adjust) {
|
int timer_duration, int resist_adjust) {
|
||||||
Lua_Safe_Call_Bool();
|
Lua_Safe_Call_Bool();
|
||||||
int16 res = resist_adjust;
|
int16 res = resist_adjust;
|
||||||
|
|
||||||
return self->CastSpell(spell_id, target_id, slot, cast_time, mana_cost, nullptr, static_cast<uint32>(item_slot),
|
return self->CastSpell(spell_id, target_id, slot, cast_time, mana_cost, nullptr, static_cast<uint32>(item_slot),
|
||||||
static_cast<uint32>(timer), static_cast<uint32>(timer_duration), 0, &res);
|
static_cast<uint32>(timer), static_cast<uint32>(timer_duration), 0, &res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ Lua_Mob Lua_Mob::GetOwner() {
|
|||||||
Lua_HateList Lua_Mob::GetHateList() {
|
Lua_HateList Lua_Mob::GetHateList() {
|
||||||
Lua_Safe_Call_Class(Lua_HateList);
|
Lua_Safe_Call_Class(Lua_HateList);
|
||||||
Lua_HateList ret;
|
Lua_HateList ret;
|
||||||
|
|
||||||
auto h_list = self->GetHateList();
|
auto h_list = self->GetHateList();
|
||||||
auto iter = h_list.begin();
|
auto iter = h_list.begin();
|
||||||
while(iter != h_list.end()) {
|
while(iter != h_list.end()) {
|
||||||
@ -1217,7 +1217,7 @@ bool Lua_Mob::EntityVariableExists(const char *name) {
|
|||||||
|
|
||||||
void Lua_Mob::Signal(uint32 id) {
|
void Lua_Mob::Signal(uint32 id) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
|
|
||||||
if(self->IsClient()) {
|
if(self->IsClient()) {
|
||||||
self->CastToClient()->Signal(id);
|
self->CastToClient()->Signal(id);
|
||||||
} else if(self->IsNPC()) {
|
} else if(self->IsNPC()) {
|
||||||
@ -1250,7 +1250,7 @@ void Lua_Mob::DoSpecialAttackDamage(Lua_Mob other, int skill, int max_damage, in
|
|||||||
self->DoSpecialAttackDamage(other, static_cast<SkillUseTypes>(skill), max_damage, min_damage, hate_override, reuse_time);
|
self->DoSpecialAttackDamage(other, static_cast<SkillUseTypes>(skill), max_damage, min_damage, hate_override, reuse_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Mob::DoSpecialAttackDamage(Lua_Mob other, int skill, int max_damage, int min_damage, int hate_override, int reuse_time,
|
void Lua_Mob::DoSpecialAttackDamage(Lua_Mob other, int skill, int max_damage, int min_damage, int hate_override, int reuse_time,
|
||||||
bool hit_chance) {
|
bool hit_chance) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->DoSpecialAttackDamage(other, static_cast<SkillUseTypes>(skill), max_damage, min_damage, hate_override, reuse_time, hit_chance);
|
self->DoSpecialAttackDamage(other, static_cast<SkillUseTypes>(skill), max_damage, min_damage, hate_override, reuse_time, hit_chance);
|
||||||
@ -1281,7 +1281,7 @@ void Lua_Mob::DoThrowingAttackDmg(Lua_Mob other, Lua_ItemInst range_weapon, Lua_
|
|||||||
self->DoThrowingAttackDmg(other, range_weapon, item, weapon_damage, chance_mod);
|
self->DoThrowingAttackDmg(other, range_weapon, item, weapon_damage, chance_mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Mob::DoThrowingAttackDmg(Lua_Mob other, Lua_ItemInst range_weapon, Lua_Item item, int weapon_damage, int chance_mod,
|
void Lua_Mob::DoThrowingAttackDmg(Lua_Mob other, Lua_ItemInst range_weapon, Lua_Item item, int weapon_damage, int chance_mod,
|
||||||
int focus) {
|
int focus) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->DoThrowingAttackDmg(other, range_weapon, item, weapon_damage, chance_mod, focus);
|
self->DoThrowingAttackDmg(other, range_weapon, item, weapon_damage, chance_mod, focus);
|
||||||
@ -1332,7 +1332,7 @@ void Lua_Mob::DoArcheryAttackDmg(Lua_Mob other, Lua_ItemInst range_weapon, Lua_I
|
|||||||
self->DoArcheryAttackDmg(other, range_weapon, ammo, weapon_damage, chance_mod);
|
self->DoArcheryAttackDmg(other, range_weapon, ammo, weapon_damage, chance_mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Mob::DoArcheryAttackDmg(Lua_Mob other, Lua_ItemInst range_weapon, Lua_ItemInst ammo, int weapon_damage, int chance_mod,
|
void Lua_Mob::DoArcheryAttackDmg(Lua_Mob other, Lua_ItemInst range_weapon, Lua_ItemInst ammo, int weapon_damage, int chance_mod,
|
||||||
int focus) {
|
int focus) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->DoArcheryAttackDmg(other, range_weapon, ammo, weapon_damage, chance_mod, focus);
|
self->DoArcheryAttackDmg(other, range_weapon, ammo, weapon_damage, chance_mod, focus);
|
||||||
@ -1390,7 +1390,7 @@ void Lua_Mob::ProjectileAnimation(Lua_Mob to, int item_id, bool is_arrow, double
|
|||||||
|
|
||||||
void Lua_Mob::ProjectileAnimation(Lua_Mob to, int item_id, bool is_arrow, double speed, double angle, double tilt, double arc) {
|
void Lua_Mob::ProjectileAnimation(Lua_Mob to, int item_id, bool is_arrow, double speed, double angle, double tilt, double arc) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->ProjectileAnimation(to, item_id, is_arrow, static_cast<float>(speed), static_cast<float>(angle), static_cast<float>(tilt),
|
self->ProjectileAnimation(to, item_id, is_arrow, static_cast<float>(speed), static_cast<float>(angle), static_cast<float>(tilt),
|
||||||
static_cast<float>(arc));
|
static_cast<float>(arc));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1630,7 +1630,7 @@ void Lua_Mob::SendSpellEffect(uint32 effect_id, uint32 duration, uint32 finish_d
|
|||||||
self->SendSpellEffect(effect_id, duration, finish_delay, zone_wide, unk020, perm_effect);
|
self->SendSpellEffect(effect_id, duration, finish_delay, zone_wide, unk020, perm_effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Mob::SendSpellEffect(uint32 effect_id, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect,
|
void Lua_Mob::SendSpellEffect(uint32 effect_id, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect,
|
||||||
Lua_Client c) {
|
Lua_Client c) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SendSpellEffect(effect_id, duration, finish_delay, zone_wide, unk020, perm_effect, c);
|
self->SendSpellEffect(effect_id, duration, finish_delay, zone_wide, unk020, perm_effect, c);
|
||||||
|
|||||||
@ -862,10 +862,7 @@ public:
|
|||||||
Shielders_Struct shielder[MAX_SHIELDERS];
|
Shielders_Struct shielder[MAX_SHIELDERS];
|
||||||
Trade* trade;
|
Trade* trade;
|
||||||
|
|
||||||
inline float GetCWPX() const { return(m_CurrentWayPoint.m_X); }
|
inline xyz_heading GetCurrentWayPoint() const { return m_CurrentWayPoint; }
|
||||||
inline float GetCWPY() const { return(m_CurrentWayPoint.m_Y); }
|
|
||||||
inline float GetCWPZ() const { return(m_CurrentWayPoint.m_Z); }
|
|
||||||
inline float GetCWPH() const { return(m_CurrentWayPoint.m_Heading); }
|
|
||||||
inline float GetCWPP() const { return(static_cast<float>(cur_wp_pause)); }
|
inline float GetCWPP() const { return(static_cast<float>(cur_wp_pause)); }
|
||||||
inline int GetCWP() const { return(cur_wp); }
|
inline int GetCWP() const { return(cur_wp); }
|
||||||
void SetCurrentWP(uint16 waypoint) { cur_wp = waypoint; }
|
void SetCurrentWP(uint16 waypoint) { cur_wp = waypoint; }
|
||||||
|
|||||||
@ -1615,7 +1615,7 @@ XS(XS_Mob_TypesTempPet)
|
|||||||
else
|
else
|
||||||
Perl_croak(aTHX_ "target is not of type Mob");
|
Perl_croak(aTHX_ "target is not of type Mob");
|
||||||
|
|
||||||
|
|
||||||
if (items < 7)
|
if (items < 7)
|
||||||
sticktarg = false;
|
sticktarg = false;
|
||||||
else {
|
else {
|
||||||
@ -3525,7 +3525,7 @@ XS(XS_Mob_GetWaypointX)
|
|||||||
if(THIS == nullptr)
|
if(THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCWPX();
|
RETVAL = THIS->GetCurrentWayPoint().m_X;
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
@ -3551,7 +3551,7 @@ XS(XS_Mob_GetWaypointY)
|
|||||||
if(THIS == nullptr)
|
if(THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCWPY();
|
RETVAL = THIS->GetCurrentWayPoint().m_Y;
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
@ -3577,7 +3577,7 @@ XS(XS_Mob_GetWaypointZ)
|
|||||||
if(THIS == nullptr)
|
if(THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCWPZ();
|
RETVAL = THIS->GetCurrentWayPoint().m_Z;
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
@ -3603,7 +3603,7 @@ XS(XS_Mob_GetWaypointH)
|
|||||||
if(THIS == nullptr)
|
if(THIS == nullptr)
|
||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetCWPH();
|
RETVAL = THIS->GetCurrentWayPoint().m_Heading;
|
||||||
XSprePUSH; PUSHn((double)RETVAL);
|
XSprePUSH; PUSHn((double)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user