Jump to content

raven_coda

Members
  • Posts

    3
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

raven_coda's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. Alright, here's a diff that uses the fixed loot_type. diff -r 7815832576de src/game/AchievementMgr.cpp --- a/src/game/AchievementMgr.cpp Tue Apr 28 00:09:37 2009 -0500 +++ b/src/game/AchievementMgr.cpp Tue Apr 28 14:58:35 2009 -0400 @@ -861,6 +861,45 @@ if(GetPlayer()->HasSpell(achievementCriteria->learn_spell.spellID)) SetCriteriaProgress(achievementCriteria, 1); break; + case ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE: + { + // miscvalue1=loot_type + // miscvalue2=count of item loot + if (!miscvalue1) + continue; + if (miscvalue1 != achievementCriteria->loot_type.lootType) + continue; + + // Zone not in dbc. + switch(achievementCriteria->ID) + { + case 5274: + { + // must be in orgrimmar + uint32 zone_id; + uint32 area_id; + GetPlayer()->GetZoneAndAreaId(zone_id,area_id); + if (zone_id != 1637) + continue; + break; + } + case 5275: + { + // must be in stormwind + uint32 zone_id; + uint32 area_id; + GetPlayer()->GetZoneAndAreaId(zone_id,area_id); + if (zone_id != 1519) + continue; + break; + } + default: + break; + } + + SetCriteriaProgress(achievementCriteria, miscvalue2, PROGRESS_ACCUMULATE); + break; + } case ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM: // speedup for non-login case if(miscvalue1 && achievementCriteria->own_item.itemID != miscvalue1) @@ -1141,7 +1180,6 @@ case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED: case ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED: case ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN: - case ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE: case ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS: case ACHIEVEMENT_CRITERIA_TYPE_TOTAL: break; // Not implemented yet @@ -1231,6 +1269,8 @@ return progress->counter >= achievementCriteria->cast_spell.castCount; case ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL: return progress->counter >= 1; + case ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE: + return progress->counter >= achievementCriteria->loot_type.lootTypeCount; case ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM: return progress->counter >= achievementCriteria->own_item.itemCount; case ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM: diff -r 7815832576de src/game/LootHandler.cpp --- a/src/game/LootHandler.cpp Tue Apr 28 00:09:37 2009 -0500 +++ b/src/game/LootHandler.cpp Tue Apr 28 14:58:35 2009 -0400 @@ -153,6 +153,7 @@ player->SendNewItem(newitem, uint32(item->count), false, false, true); player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item->itemid, item->count); + player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, (loot->loot_type == LOOT_FISHINGHOLE ? LOOT_FISHING : loot->loot_type), item->count); } else player->SendEquipError( msg, NULL, NULL ); @@ -509,6 +510,7 @@ Item * newitem = target->StoreNewItem( dest, item.itemid, true, item.randomPropertyId ); target->SendNewItem(newitem, uint32(item.count), false, false, true ); target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item.itemid, item.count); + target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, (pLoot->loot_type == LOOT_FISHINGHOLE ? LOOT_FISHING : pLoot->loot_type), item.count); // mark as looted item.count=0; diff -r 7815832576de src/game/LootMgr.h --- a/src/game/LootMgr.h Tue Apr 28 00:09:37 2009 -0500 +++ b/src/game/LootMgr.h Tue Apr 28 14:58:35 2009 -0400 @@ -57,6 +57,20 @@ NONE_PERMISSION = 3 }; +enum LootType +{ + LOOT_CORPSE = 1, + LOOT_PICKPOCKETING = 2, + LOOT_FISHING = 3, + LOOT_DISENCHANTING = 4, + // ignored always by client + LOOT_SKINNING = 6, + LOOT_PROSPECTING = 7, + LOOT_MILLING = 8, + + LOOT_FISHINGHOLE = 20, // unsupported by client, sending LOOT_FISHING instead + LOOT_INSIGNIA = 21 // unsupported by client, sending LOOT_CORPSE instead +}; class Player; class LootStore; @@ -226,6 +240,7 @@ std::vector<LootItem> items; uint32 gold; uint8 unlootedCount; + LootType loot_type; Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0) {} ~Loot() { clear(); } diff -r 7815832576de src/game/Player.cpp --- a/src/game/Player.cpp Tue Apr 28 00:09:37 2009 -0500 +++ b/src/game/Player.cpp Tue Apr 28 14:58:35 2009 -0400 @@ -7455,6 +7455,8 @@ } SetLootGUID(guid); + + loot->loot_type = loot_type; // LOOT_INSIGNIA and LOOT_FISHINGHOLE unsupported by client switch(loot_type) diff -r 7815832576de src/game/Player.h --- a/src/game/Player.h Tue Apr 28 00:09:37 2009 -0500 +++ b/src/game/Player.h Tue Apr 28 14:58:36 2009 -0400 @@ -455,20 +455,7 @@ ERR_TAXINOTSTANDING = 12 }; -enum LootType -{ - LOOT_CORPSE = 1, - LOOT_PICKPOCKETING = 2, - LOOT_FISHING = 3, - LOOT_DISENCHANTING = 4, - // ignored always by client - LOOT_SKINNING = 6, - LOOT_PROSPECTING = 7, - LOOT_MILLING = 8, - LOOT_FISHINGHOLE = 20, // unsupported by client, sending LOOT_FISHING instead - LOOT_INSIGNIA = 21 // unsupported by client, sending LOOT_CORPSE instead -}; enum MirrorTimerType { Thanks for fixing the loot_type so that we can get this integrated
  2. Can I be of any help to speed up the process? I'd be willing to be a testbed for part if you'd like. To be honest I'm just interested in getting the achievement for catching 100 fish working, but I help to fix all the others along with it so the job gets done right.
  3. Your right, the code you have written for LOOT_TYPE looks better. Honestly, I'd just like to see the code implemented more then anything as I'd like to be able to do the fishing achievements. Are you going to incorporate this into both cores or should I update my post on the trinity site to reflect you changes? Thanks for putting my other patch in btw. Also, did you see my fix to SPELL_LEARN achievement in that patch?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use