Developer Store
Support
Member Forums

Screenshots
FAQ
Documentation
License
Known Issues
Downloads

MMOWorkshop.com Store Opened!
Torque MMO Kit - Open Sourced!
Torque MMO Kit - 1.5.2 Port Alpha Test
Torque MMO Kit - OSX Status

GarageGames.com irc.prairiegames.com
#mmoworkshop

PyTorque
TGB Web Browser


Boaal

mpratt - MMO Game
xapken - nice
foodstamp - Another Day Another Step Accomplished
hallsofvalhalla - After a long epiphany
Leathel - FoHO pre-Alpha 2.42
OldRod - More Musings on the MMO Industry
J.C. Smith - 0.0.4.1 Build Notes
Wolf Dreamer - Pointless blog of pointless things
... MORE BLOGS!

No worlds showing up
Problem with reactor.connectTCP(...
Quest Remnants of Chaos
Foundations of Hope Online
need help with creating spells
avatar
ITEM VARIANTS ERADICATED... (for...
Recruiting a artist and 3D artis...
Looking for support and 3D model...
Trouble

Changeset 1635

Show
Ignore:
Timestamp:
07/22/08 02:38:52 (4 months ago)
Author:
Llarlen
Message:
  • Added a RPG_SPAWN_NORANDOMLOOT spawn flag to block random loot generation.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/games/minionsofmirth/v1/experimental/new-stuff/mud/world/defines.py

    r1614 r1635  
    534534# Never generate aggro based on realm or factions, only when provoked. 
    535535RPG_SPAWN_PASSIVE = 1 << 8 
     536# Don't generate any loot at all. 
     537RPG_SPAWN_NORANDOMLOOT = 1 << 9 
    536538# Player monster received template advancement points if set. 
    537539# Exists so old monsters can be given their missing advancement 
  • branches/games/minionsofmirth/v1/experimental/new-stuff/mud/world/loot.py

    r1614 r1635  
    219219                    if len(loot) == 16: 
    220220                        break 
    221   
     221         
     222        # Check if this particular spawn drops random loot or if the loot 
     223        #  table already is maxed out. 
     224        if len(loot) >= 16 or spawn.flags & RPG_SPAWN_NORANDOMLOOT: 
     225            # No random loot or loot table full, 
     226            #  so finish the corpse loot generation. 
     227            return self.finishCorpseLootGeneration() 
     228         
    222229    #Start code added by BellyFish 
    223230         # Zone dependent Seasonal drops 
    224         if len(loot) < 16 and ZONE_SEASONALITEMS.has_key(self.mob.zone.zone.name): 
     231        if ZONE_SEASONALITEMS.has_key(self.mob.zone.zone.name): 
    225232            # check if mob can have a Seasonal drop, a 1 in 4 chance 
    226233            # as the ZONE_SEASONALITEMS list increases for the same time period the chance for a 
     
    510517                    traceback.print_exc() 
    511518         
     519        # Finish corpse loot generation. 
     520        return self.finishCorpseLootGeneration() 
     521     
     522     
     523    def finishCorpseLootGeneration(self): 
    512524        # Now assign to every item in the loot table a random 
    513525        #  repair value if the item makes use of one. 
    514         for item in loot
     526        for item in self.items
    515527            if not (item.flags & RPG_ITEM_INDESTRUCTIBLE) and item.repairMax > 0: 
    516528                if item.repairMax == 1: 
     
    521533        # Return True if this mob got something to loot, 
    522534        #  otherwise False. 
    523         if len(loot): 
    524             self.items = loot 
    525             return True 
    526         if self.tin: 
    527             return True 
    528         return False 
     535        return (self.tin or len(self.items)) 
    529536     
    530537