diff --git a/zone/bot.cpp b/zone/bot.cpp index 474d23115..265f34117 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -6022,7 +6022,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli // TODO: Figure out what the actual max slot id is const int MAX_SLOT_ID = 3179; uint32 items[MAX_SLOT_ID] = {0}; - uint8 charges[MAX_SLOT_ID] = {0}; + uint16 charges[MAX_SLOT_ID] = {0}; bool botCanWear[MAX_SLOT_ID] = {0}; for(int16 i=beginSlotID; i<=endSlotID; ++i) { @@ -8035,7 +8035,7 @@ void Bot::DoRiposte(Mob* defender) { if(DoubleRipChance && (DoubleRipChance >= MakeRandomInt(0, 100))) { if (defender->GetClass() == MONK) - defender->MonkSpecialAttack(this, defender->GetAABonuses().GiveDoubleRiposte[2]); + defender->MonkSpecialAttack(this, (uint8)defender->GetAABonuses().GiveDoubleRiposte[2]); else if (defender->IsBot()) defender->CastToClient()->DoClassAttacks(this,defender->GetAABonuses().GiveDoubleRiposte[2], true); } @@ -8354,7 +8354,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) { } int32 dmg = 0; - uint16 skill_to_use = -1; + uint8 skill_to_use = -1; int level = GetLevel(); int reuse = TauntReuseTime * 1000; //make this very long since if they dont use it once, they prolly never will @@ -9528,7 +9528,7 @@ void Bot::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caste Mob::DoBuffTic(spell_id, slot, ticsremaining, caster_level, caster); } -bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_time, int32 mana_cost, uint32* oSpellWillFinish, uint32 item_slot, int16 *resist_adjust) { +bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint8 slot, int32 cast_time, int32 mana_cost, uint32* oSpellWillFinish, uint32 item_slot, int16 *resist_adjust) { bool Result = false; if(zone && !zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())) { @@ -9548,7 +9548,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t if(IsAmnesiad() && IsDiscipline(spell_id)) Message_StringID(13, MELEE_SILENCE); if(casting_spell_id) - AI_Event_SpellCastFinished(false, casting_spell_slot); + AI_Event_SpellCastFinished(false, (uint8)casting_spell_slot); return(false); } } @@ -9556,7 +9556,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t if(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()){ Message_StringID(13, SPELL_WOULDNT_HOLD); if(casting_spell_id) - AI_Event_SpellCastFinished(false, casting_spell_slot); + AI_Event_SpellCastFinished(false, (uint8)casting_spell_slot); return(false); } diff --git a/zone/bot.h b/zone/bot.h index 485d37377..f4c6f0f95 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -311,7 +311,7 @@ public: virtual float GetAOERange(uint16 spell_id); virtual bool SpellEffect(Mob* caster, uint16 spell_id, float partial = 100); virtual void DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caster_level, Mob* caster = 0); - virtual bool CastSpell(uint16 spell_id, uint16 target_id, uint16 slot = 10, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, int16 *resist_adjust = nullptr); + virtual bool CastSpell(uint16 spell_id, uint16 target_id, uint8 slot = 10, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, int16 *resist_adjust = nullptr); virtual bool SpellOnTarget(uint16 spell_id, Mob* spelltar); virtual bool IsImmuneToSpell(uint16 spell_id, Mob *caster); virtual bool DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction); diff --git a/zone/corpse.cpp b/zone/corpse.cpp index a86d63723..9b3fb7f30 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -193,7 +193,7 @@ Corpse* Corpse::LoadFromDBData(uint32 in_dbid, uint32 in_charid, char* in_charna Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, uint32 in_npctypeid, const NPCType** in_npctypedata, uint32 in_decaytime) // vesuvias - appearence fix : Mob("Unnamed_Corpse","",0,0,in_npc->GetGender(),in_npc->GetRace(),in_npc->GetClass(),BT_Humanoid,//bodytype added - in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0, + (uint8)in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0, in_npc->GetHeading(),in_npc->GetX(),in_npc->GetY(),in_npc->GetZ(),0, in_npc->GetTexture(),in_npc->GetHelmTexture(), 0,0,0,0,0,0,0,0,0, @@ -261,7 +261,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) client->GetRace(), client->GetClass(), BT_Humanoid, // bodytype added - client->GetDeity(), + (uint8)client->GetDeity(), client->GetLevel(), 0, client->GetSize(), @@ -650,7 +650,7 @@ uint32 Corpse::CountItems() { return itemlist.size(); } -void Corpse::AddItem(uint32 itemnum, uint16 charges, int16 slot, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5) { +void Corpse::AddItem(uint32 itemnum, uint8 charges, int16 slot, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5) { if (!database.GetItem(itemnum)) return; pIsChanged = true; diff --git a/zone/corpse.h b/zone/corpse.h index b9999e79b..cc236173a 100644 --- a/zone/corpse.h +++ b/zone/corpse.h @@ -71,7 +71,7 @@ public: void SetDecayTimer(uint32 decaytime); bool IsEmpty() const; - void AddItem(uint32 itemnum, uint16 charges, int16 slot = 0, uint32 aug1=0, uint32 aug2=0, uint32 aug3=0, uint32 aug4=0, uint32 aug5=0); + void AddItem(uint32 itemnum, uint8 charges, int16 slot = 0, uint32 aug1=0, uint32 aug2=0, uint32 aug3=0, uint32 aug4=0, uint32 aug5=0); uint32 GetWornItem(int16 equipSlot) const; ServerLootItem_Struct* GetItem(uint16 lootslot, ServerLootItem_Struct** bag_item_data = 0); void RemoveItem(uint16 lootslot);