Jump to content

caeruleaus

Members
  • Posts

    185
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by caeruleaus

  1. you can checkout SD2 with git but you need to do git svn clone *repository* instead of just git clone *repository*
  2. should work on "newest" sources diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e482f7d..350a2ca 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -21409,6 +21409,37 @@ void Player::UpdateFallInformationIfNeed( MovementInfo const& minfo,uint16 opcod SetFallInformation(minfo.GetFallTime(), minfo.GetPos()->z); } +///PVP Token +void Player::ReceiveToken() +{ + if(!sWorld.getConfig(CONFIG_PVP_TOKEN_ENABLE)) + return; + + uint8 MapRestriction = sWorld.getConfig(CONFIG_PVP_TOKEN_RESTRICTION); + + if( MapRestriction == 1 && !InBattleGround() && !HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP) || + MapRestriction == 2 && !HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP) || + MapRestriction == 3 && !InBattleGround()) + return; + + uint32 itemID = sWorld.getConfig(CONFIG_PVP_TOKEN_ITEMID); + uint32 itemCount = sWorld.getConfig(CONFIG_PVP_TOKEN_ITEMCOUNT); + + ItemPosCountVec dest; + uint8 msg = CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemID, itemCount); + if( msg != EQUIP_ERR_OK ) // convert to possible store amount + { + SendEquipError( msg, NULL, NULL ); + return; + } + + Item* item = StoreNewItem( dest, itemID, true, Item::GenerateItemRandomPropertyId(itemID)); + SendNewItem(item,itemCount,true,false); + + ChatHandler(this).PSendSysMessage(LANG_YOU_RECEIVE_TOKEN); +} + + void Player::UnsummonPetTemporaryIfAny() { Pet* pet = GetPet(); diff --git a/src/game/Player.h b/src/game/Player.h index 299dd31..3876208 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1964,6 +1964,9 @@ class MANGOS_DLL_SPEC Player : public Unit void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply); void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply); + ///PVP Token + void ReceiveToken(); + void _ApplyItemMods(Item *item,uint8 slot,bool apply); void _RemoveAllItemMods(); void _ApplyAllItemMods(); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3d0d448..10f57ea 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -709,6 +709,11 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa player->RewardPlayerAndGroupAtKill(pVictim); player->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0); + // PvP Token + int8 leveldiff = player->getLevel() - pVictim->getLevel(); + if((pVictim->GetTypeId() == TYPEID_PLAYER) && leveldiff < 10) + player->ReceiveToken(); + WorldPacket data(SMSG_PARTYKILLLOG, (8+8)); //send event PARTY_KILL data << uint64(player->GetGUID()); //player with killing blow data << uint64(pVictim->GetGUID()); //victim diff --git a/src/game/World.cpp b/src/game/World.cpp index 6bf92af..d55102a 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -757,6 +757,15 @@ void World::LoadConfigSettings(bool reload) setConfig(CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL, "TimerBar.Fire.GMLevel", SEC_CONSOLE); setConfig(CONFIG_UINT32_TIMERBAR_FIRE_MAX, "TimerBar.Fire.Max", 1); + /* PvP Token System */ + setConfig(CONFIG_PVP_TOKEN_ENABLE,"PvPToken.Enable", true); + setConfig(CONFIG_PVP_TOKEN_ITEMID,"PvPToken.ItemID", 29434); + setConfig(CONFIG_PVP_TOKEN_ITEMCOUNT,"PvPToken.ItemCount", 1); + setConfig(CONFIG_PVP_TOKEN_RESTRICTION,"PvPToken.MapRestriction", 4); + + if(getConfig(CONFIG_PVP_TOKEN_ITEMCOUNT) < 1) + setConfig(CONFIG_PVP_TOKEN_ITEMCOUNT,"PvPToken.ItemCount",1); + m_VisibleUnitGreyDistance = sConfig.GetFloatDefault("Visibility.Distance.Grey.Unit", 1); if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE) { diff --git a/src/game/World.h b/src/game/World.h index 2cbaa40..4244156 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -261,6 +261,12 @@ enum eConfigFloatValues CONFIG_FLOAT_GROUP_XP_DISTANCE, CONFIG_FLOAT_THREAT_RADIUS, CONFIG_FLOAT_VALUE_COUNT + + ///PVP Token + CONFIG_PVP_TOKEN_ENABLE, + CONFIG_PVP_TOKEN_ITEMID, + CONFIG_PVP_TOKEN_ITEMCOUNT, + CONFIG_PVP_TOKEN_RESTRICTION }; /// Configuration elements diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index e330abe..7b2804a 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1452,6 +1452,36 @@ SOAP.IP = 127.0.0.1 SOAP.Port = 7878 ################################################################################################################### +# PvP Token System (custom patch) +# +# PvPToken.Enable +# Enable/disable PvP Token system. +# Default: 1 (enabled) +# 0 (disabled) +# +# PvPToken.ItemID +# The item ID of the token that players will receive after killing an enemy. +# Default: 29434 (Badge of Justice) +# +# PvPToken.ItemCount +# The count amount of the ItemID +# Default: 1 +# +# PvPToken.MapRestriction +# The type of maps where players can receive the token +# Default: 4 - all maps +# 3 - battlegrounds only +# 2 - FFA areas only (both instanced and world arenas) +# 1 - battlegrounds and FFA areas only +# +################################################################################################################### + +PvPToken.Enable = 1 +PvPToken.ItemID = 29434 +PvPToken.ItemCount = 1 +PvPToken.MapRestriction = 4 + +################################################################################################################### # CharDelete.Method # Character deletion behavior # Default: 0 - Completely remove the character from the database
  3. I got it to compile on x64, you just need to edit the VS x64 configuration.
  4. well if you download one of the newest rev's youll be fine. But it's recommended to use GIT anyways just so if you do have errors and whatnot and you report them, then it's not something that could have possibly been fixed. If you need any help with GIt look in the source code management section as there are a few guides there. If you can't find what you're looking for either make a post or message me and I'll try to help if i can.
  5. REV: 9466 This is the commit if you just want to cherry pick it: http://github.com/mangos/mangos/commit/2e4a3ca5e6f3cb11cce5d70f45f997f158d8f908
  6. .git has nothing to do with it being linux or not.... Why not just update your WoW client? Mangos supports 3.3.3a now. do git reset --hard c7c8c8ed014dbbd034ae20e7d73beca38d7a4adc if you want mangos for 3.3.2a
  7. I actually managed to push all the mmaps to a github repo (they probably hate me over there lol). It'll take a little to dl but no where near as bad as generating them. just pull from my repo at: git://github.com/caeruleaus/mangos.git mmaps It's faramir118's repo plus the added mmap files in zip archives. I use 7zip so i don't know if it'll work correctly with other zip programs. just open any of the mmaps.zip.00# files and extract and your set
  8. I wouldn't recommend doing it, i pasted how to do it further up in the post. It takes 5 days to finish
  9. err i extracted every MMAP but i don't really have a way to upload it cause its 2.56 gb of data lol. If people want any specific maps i suppose i can upload them
  10. worked for me i think. I ended up with 1.30 gb and 8532 files
  11. Yeah i had seen the accidental use of the delete also. To get it to those lines (yes I'm sorry it's actually two lines =P lol) I put a lot of printf statements to figure out where the program hung up. It calls so many different writeToFiles though that I didn't trace all the way through lol. I could be wrong (which is quite possible) but that's just where it seemed to be happening.
  12. you need to fix the internal cooldown of it. And it does that with my patch? I Couldn't test in a raid cause I have a lone test server but with my patch it shouldn't affect the entire raid anymore.
  13. it's crashing at this line in WorldModel::writeFile() for(uint32 i=0; i<groupModels.size() && result; ++i) result = groupModels[i].writeToFile(wf);
  14. I'm generating them for the hell of it. I'll upload all of them once it's done. I'm currently on map 530 so theres only a few more left
  15. it's crashing because of a a vector check actually. I'll go run it again and debug it for you. #endif /* _HAS_ITERATOR_DEBUGGING */ _SCL_SECURE_VALIDATE_RANGE(_Pos < size()); <---------- Debugger says it crashes there return (*(_Myfirst + _Pos)); } EDIT: I compiled the assembler in debug and then ran it. It's throwing an assert that the vector subscript is out of range (which makes sense since that what it's checking here.)
  16. that's true lol. Well I might mess around with it a little just to see what's up with it. I'm actually making mmaps for every map tile right now using the thing i mentioned. It's been running for like 2 hours and it's only on like map 1 lol
  17. i was bored so i actually got every map file split into map Id, X, and Y http://paste2.org/p/790381 cope and paste the whole thing into a file called convert.txt and place it in the same folder as your generator.exe you can run a simple command in the git bash (it has to be git bash since windows doesn't have a read command) to convert EVERY map. It'll take a long ass time though. while read -d ";" line; do generator $line; done <convert.txt this should work on linux also since the read command is actually part of linux
  18. making any progress faramir?
  19. For me it created 6517 files in the buildings directory. When i run the assembler it says the min guid max guid thing right off the bat and then crashes once it gets to "Converting stormwind.wmo"
  20. i got it to extract fine. But when i run the assembler i get an error that says "Error: file name too long!" and then on the next line something like min guid: 5579 max guid:5497953 Then it starts to assemble the vmaps but crashes on stormwind.wmo
  21. I have Windows 7 x64 and for my general purpose testing it runs just fine. And you can use the trial DVDs or download the client directly from blizz, doesn't really matter.
  22. guess no one's interested? Ohhhh welll. At least it's useful for me =P
  23. ooo okay, i get it. It was because it was added to the VC80 sln and was looking for it. I'll just remove it then.
  24. Found DBC files for build 11403 but mangosd expected DBC for one from builds: 11723 Please extract correct DBC files. mangos is on 3.3.3a build 11723. you're on 3.3.2a build 11403. update your client
  25. i always get 0 starting points found even when I do one that's labeled as a start point in the xls file
×
×
  • 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